Wednesday, 22 April 2015

Migration In Mvc5

First Create model.cs

     First you can create a model class as you want attributes
       Models > model.cs

   Create Controller and views for the model.cs
 
   Rebuild the project

    Then Add-Migration in PM Console:
     
     Tools > NuGet Package Manager > package manager console
  
    Type Add-Migration Initial Create
     
     Note: not necessary to use initial create you use any name for that 

     Type Update-Database.

    That's all see the database ...Saravanan Arunagiri