Use subsonic 3.0 SimpleRepository to a existing database

筅森魡賤 提交于 2019-12-01 18:40:04

It sounds like you already have a database designed in which case I would suggest you use the LinqTemplates or ActiveRecord instead. SimpleRepository seems to really be suited to a code first development process rather than a database first.

So it sounds like you have an existing database schema and an existing entity model (also known as a repository) and you want an ORM to push/pull data to/from your database and your application.

Unfotunately SubSonic is not the right tool for this scenario. SubSonic will create your entity model from your database schema or it will create your database schema from your entity model. But it won't map from one to another because it was designed with the idea of "convention over configuration". SubSonic is simple and that is its strength, but simplicity comes at a price.

What you need for this scenario is NHibernate. It was designed with lots of configurability. see http://nhforge.org/Default.aspx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!