Skip to main content


Showing posts with the label Code First

Code First Migrations in Entity Framework

This walkthrough will provide an overview Code First Migrations in Entity Framework. You can either complete the entire walkthrough or skip to the topic you are interested in. The following topics are covered.

Enabling MigrationsGenerating & Running MigrationsCustomizing MigrationsData Motion & Custom SQLMigrating to a Specific Version (Including Downgrade)Generating a SQL ScriptAutomatically Upgrading on Application Startup (MigrateDatabaseToLatestVersion Initializer)
I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter t…

Creating an Application Using Entity Framework 4.1 Code First Approach

In my previous article I discussed developing a simple basic multilayered architecture for a .Net application. However there were a few points that I skipped since the article was for beginners. When we talk about an application architecture there are certain points that need to be clarified before proceeding; they are:

Is the architecture loosely coupled?Is it to be service-based?Where should the entities reside?What should be the Mode of Communication with the database?Does it require design patterns? If yes, What patterns should be implemented?Should it be based on a Separation of Concerns?To answer these types of questions, .Net 4 has come up with a generic solution, making use of the Entity Framework.

My effort in this article would be to put some light on building a generic multilayered architecture using Entity Framework 4.1 and the MVC3 Razor view engine. We'll use inversion of control to resolve dependency of layers. The points to be covered in this article would be as foll…