Friday, June 3, 2011

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

When I have first come across Entity Framework, I was looking for the ways to put my database schema generated by the object model I have in my domain model. This way, I feel like I am coding in NHibenate that makes me satisfied with the result. Because of the testability, maintainability it brings to my code.Unfortunately, It was practically impossible to code that way till now that Microsoft released Entity Framework 4.1 Code-First. 
In the following series I am going to show some of the ways that might be helpful for production code that are very much close to the NHibernate's best practices but this time EF is under the hood. 
My domain model is simple accounting model used for my pet project.





Before I go further, Latest versions of Entity Framework(including code-first) can be get via nuget.org.
You can write (Install-Package EntityFramework) in package manager and get the entity framework.



No comments:

Post a Comment