Friday, June 24, 2011

EF Code-First in the shape of NHibernate - Using (5/5)



Once your database is built, using EF Code-First for the rest of the project is as easy as NHibenate. Same Patterns like Repository, Unit of work... can be applied to the codes in your application.

Even there is no difference between Code-First or Database-First (the one that you create your model out of your database) mode in your business logic code.

By this approach your model (Genrally POCO [ Plain Old CLR Object]) is first initialized and database is built as the result of your object model. By some tricks like migrations you can narrow your database recreation down to some field name modification or changes in size.

No comments:

Post a Comment