Introduction: In
this article I will explain how we can enable Code First migration in asp.net MVC 4
Description:
In the previous article I have explained Create, Read, Update and Delete in Asp.net with MVC 4 Razor view Engine using Entity framework with Code first approach, How to integrate Captcha in asp.net,What is Scaffolding in Asp.net MVC?, How to create Contact Us page in Asp.net and What is Asp.net MVC? Its advantages and disadvantges.
Migration is used to backup our database when we are going
to develop application using code first approach in asp.net MVC.
I have a class named Student_Detail.cs
in Models:
public class Student_Detail
{
public int Id { get; set; }
public string Name { get; set; }
public string Subject { get; set; }
public int Marks { get; set; }
}
Now I add a new property in this class for student address.