gpt4 book ai didi

c# - Linq-To-SQL CreateDatabase 不创建存储过程

转载 作者:行者123 更新时间:2023-11-30 15:08:58 25 4
gpt4 key购买 nike

到 SQL DataContext 并运行:

datacontext.CreateDatabase()

这很好用。

最近我将一个存储过程拖到方法 Pane 中。我在想这个存储过程现在是数据上下文的一部分,并且会在创建数据库时重新生成。

好像没有。有谁知道为什么或如何实现它?

最佳答案

The DataContext.CreateDatabase method creates a replica of the database only to the extent of the information encoded in the object model. Mapping files and attributes from your object model might not encode everything about the structure of an existing database. Mapping information does not represent the contents of user-defined functions, stored procedures, triggers, or check constraints. This behavior is sufficient for a variety of databases.

SP 不属于 http://msdn.microsoft.com/en-us/library/bb399420.aspx

关于c# - Linq-To-SQL CreateDatabase 不创建存储过程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4964956/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com