使用 SMO 或 Linq 的 SQL Server CLR 触发器?

发布于 2024-08-11 12:53:58 字数 153 浏览 1 评论 0原文

我一直在研究创建用于插入的 CLR 触发器的可能性,但是找到的每个教程都给了我使用 ado.net 对象来执行逻辑的示例 - 这不是很方便的方法..(我认为我没有说服任何人)

我想知道是否还有另一种方法可以做到这一点? SMO?林克?除了普通的 ADO.NET 之外还有什么?

I've been looking at the possibility of creating a CLR trigger for insert, but every tutorial found gives me examples of using ado.net objects to do the logic - this is not very convenient way..(I don't think I have to convince anyone about that)

I was wondering if maybe there is another way for doing this? SMO? Linq? Anything except plain ADO.NET ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

人心善变 2024-08-18 12:53:58

SQL Server 仅支持 CLR 程序集的一小部分支持的 .NET Framework 库

  • CustomMarshalers
  • Microsoft.VisualBasic
  • Microsoft.VisualC
  • mscorlib
  • 系统
  • System.Configuration
  • System.Data
  • System.Data.OracleClient
  • System.Data.SqlXml
  • System.Deployment
  • System.Security
  • System.Transactions
  • System.Web.Services
  • System.Xml
  • System.Core.dll
  • System .Xml.Linq.dll

支持 LINQ,但不支持 LINQ.Data,因此您可以在对象上使用 linq,而不是 linq 2 sql。

SQL Server only supports a small subset of CLR assemblies Supported .NET Framework Libraries:

  • CustomMarshalers
  • Microsoft.VisualBasic
  • Microsoft.VisualC
  • mscorlib
  • System
  • System.Configuration
  • System.Data
  • System.Data.OracleClient
  • System.Data.SqlXml
  • System.Deployment
  • System.Security
  • System.Transactions
  • System.Web.Services
  • System.Xml
  • System.Core.dll
  • System.Xml.Linq.dll

LINQ is supported, but LINQ.Data is not, so you can use linq over objects not linq 2 sql.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文