EF 4 和 POCO 的最佳实践/入门解决方案
我已经在互联网上搜索了几个月,寻找一些关于创建新的 ASP.NET MVC3(或MVC2)网站的可靠(且简单)示例,该网站可以使用 POCO 和 EF4 连接到 SQL Server 2008。
我理解这些概念,但鉴于它们有许多不同的方法来完成相同的工作,我正在努力寻找一个完整的开始到完成的示例,我可以将其用作我想要使用这些技术进行的小型网络项目的基础。我没有现有的数据库架构,但不想使用代码优先的 EF4 方法,我宁愿在 SQL Server 中创建模型,然后将实体导入 EF4。
我已经使用“完整堆栈”视频创建了一个项目,但后来意识到这是特定于代码优先的,所以现在又有点摸不着头脑了。
如果有人有任何好的 URL 可以分享,或者确实有代码/sln 文件,那就太好了。或者,如果有人有空闲时间根据我的规范以少量费用(50 美元)创建这样一个项目,那么我也会对此感兴趣。如果本论坛不允许此类请求,我深表歉意。
我期待听到您的意见。
I have been trawling the internet for some months now, looking for some solid (and simple) examples regarding creating a new ASP.NET MVC3 (orMVC2) web site, that could connect to SQL Server 2008, using POCOs and EF4.
I understand the concepts, but seeing as their are many different ways to do the same job i'm struggling to find a full start to finish example I can use as a foundation, for a small web project I want to do in these technologies. I have the luxury of no existing db schema, but do not want to use code-first EF4 approach, I would rather do the model in SQL Server and then import entities into EF4.
I have created a project using 'the full stack' videos, but then realized that is specific to code-first, so sort of scratching my head again now.
If anyone has any good URL's to share, or indeed code/sln files then that would be great. Alternatively, if someone had the spare time to create such a project for a small fee, (50USD), from my specification then I would be interested in that also. I apologies if such requests are not permitted on this forum.
I look forward to hearing your comments.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
本音乐商店教程使用 EF4。尽管它是代码优先的,但它展示了如何连接到现有数据库,而不是许多“即时”创建数据库的教程。
This music store tutorial uses EF4. Although it's code-first, it shows how to connect to an existing DB as opposed to a lot of tutorials that create the DB "on the fly".
这是一个关于如何使用现有数据库模式“首先编码”的好例子。
http ://weblogs.asp.net/scottgu/archive/2010/08/03/using-ef-code-first-with-an-existing-database.aspx
Here's a good example on how to "code first" with an existing database schema.
http://weblogs.asp.net/scottgu/archive/2010/08/03/using-ef-code-first-with-an-existing-database.aspx