开发者

Keeping nhibernate fluent mapping in sync with the database

开发者 https://www.devze.com 2022-12-12 17:12 出处:网络
We are currently using Fluent NHibernate and SQL Server 2008 in our c# development, however, the database schema has become too complex for Fluent to re-create the database when necessary so we are ma

We are currently using Fluent NHibernate and SQL Server 2008 in our c# development, however, the database schema has become too complex for Fluent to re-create the database when necessary so we are making changes to the database using scripts.

This also means that the entity and mapping classes also need to be changed to remain in sync with the DB schema.

Is there a tool or some clever way of doing this "automatically"?

If we were to use DevForce from IdeaBlade, for example, their framework has tools to check the mapping against the schema and to update the mappings if required and we were wondering if something开发者_运维问答 similar existed for Fluent.

So, ladies and gentlemen, over to you...


Not really. Just update your mappings as you write your script. Chances are you'll be changing your entities as-well anyway.

0

精彩评论

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

关注公众号