开发者

ORM for simple .NET app [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit 开发者_Go百科debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 11 years ago.

I need to develop a .NET 4 application with an MS SQL Server 2008 database. There will be about 5-6 "classes." I am familiar with developing applications in Python/SqlAlchemy ORM.

Is there any simple mechanism to do the following tasks?

  • create classes and their dependencies
  • automatically create database tables and query classes in C#


Take a look at Entity Framework 4.1 "Code First". It lets you describe the data model in code, and as you say, then let magic happen.


For simple project you can use: SubSonic - it's easy to use with only few dlls. It has also easy learning curve.


I recommend you to check out Entity Framework. In the new version, 4.1, there is a feature called Code-First that does what you describe.

ScottGu has a great blogpost explaining it:


My preference for ORM in .NET is Entity Framework 4. It can easily create the classes from your database schema, and combined with LINQ it's a powerful combination.

You can find a link here.


You should also look at ASP.NET Dynamic Data - it works in with Entity Fx for Scaffolding even UI. Great for small data-entry applications where you don't want very specific UI.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜