在 SQL Server 2000 中使用存储过程的 Linq-to-SQL 缺少映射

发布于 2024-12-25 09:34:29 字数 243 浏览 2 评论 0原文

我使用 SQL Server 2000 并运行 SQLMetal 来生成我的 Mappings.xml 和我的 DataContext 代码

这对于表的 CRUD 来说一切都很好。

现在我需要使用存储过程对具有相同结构的表执行 CRUD。

我知道如何使用 VS 2010 中的漂亮设计器和 SQL Server 2008 来执行此操作,但是如何使用 SQL Server 2000 手动执行此操作?

I using SQL Server 2000 and running SQLMetal to generate my Mappings.xml and my DataContext code

This all works fine for CRUD to a table.

Now I need to use stored procedures to perform my CRUD to the table with the same structure.

I know how to do this using the nice designer in VS 2010 and to a SQL Server 2008, but how do you do this by hand with SQL Server 2000?

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

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

发布评论

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

评论(1

无边思念无边月 2025-01-01 09:34:29

SQLMetal 命令行选项中的 /sprocs 选项从数据库中提取存储过程的映射。这些映射与您当前看到的表/视图映射类似。

因此示例命令如下所示。

sqlmetal /server:myserver /database:northwind /sprocs /map:Mappings.xml

有关详细列表,请参阅此 MSDN 文档命令行开关。

请注意 Linq To SQL 与 MS SQL Server 2000 的限制,请参阅此 MSDN 文档 对于一些已知的限制。

The /sprocs option in the SQLMetal command line options extracts the mappings for Stored Procedures from the database. The mappings would be similar to the table/view mappings that you're seeing currently.

So a sample command would look like.

sqlmetal /server:myserver /database:northwind /sprocs /map:Mappings.xml

Refer this MSDN doc for detailed list of command line switches.

Be aware of the limitations of Linq To SQL with MS SQL Server 2000, refer this MSDN doc for some of the known limitations.

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