开发者

Entity Framework Multiple Stored Procedures

I am quite new to the Entity Framework, and only have recently started looking into it. I have been using Linq to SQL for sometime now in a C# enviroement and found it really wonderful to use.

Currently I use sqlmetal to generate a DataContext File (Linq to SQL).

Now after some time I thought it would be nice to use to the Entity Framework, (Linq to Entities), I can see that in some respect there are syntatical similarities between the two, i.e. accessing and creating new instances providing the connection string.

However what Im interested in is when the mapping is generated, is there a way to automatically import all the stor开发者_运维技巧ed procedures, similar to how sqlmetal does it. So that I dont have to import each one individually.

Thank you in advance.


In the Model Designer (inside Visual Studio, default view option for *.edmx files)

right click --> Update Model from Database

in the "Add" tab of the resulting dialog you can select any or all Stored Procedures.

Edit: Here's a screenshot of the dialog I'm talking about, found at a tutorial at robbagby.com

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜