see the images then you can understand what kind of problem i am talking about.
suppose in database i have one table user and i want to generate entity class for user table. so i did this way. my steps are
1) Select ADO.NET Entity Data Model in the Add New Item dialog box

2) Select Code First from database option and click Next

3) Now, select the data connection for the existing database. Create a new connection for your database if the dropdown does not include the connection to your existing database. ClickNext to continue.

4) Now, choose the tables and views for which you want to generate classes and click onFinish.

5) This will generate all the entity classes for your DB tables and views as shown below.

public partial class SchoolContext : DbContext
{
public SchoolContext()
: base("name=SchoolContext2")
{
}
public virtual DbSet<Course> Courses { get; set; }
public virtual DbSet<Standard> Standards { get; set; }
public virtual DbSet<Student> Students { get; set; }
public virtual DbSet<StudentAddress> StudentAddresses { get; set; }
public virtual DbSet<Teacher> Teachers { get; set; }
public virtual DbSet<View_StudentCourse> View_StudentCourse { get; set; }
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
modelBuilder.Entity<Course>()
.Property(e => e.CourseName)
.IsUnicode(false);
modelBuilder.Entity<Course>()
.HasMany(e => e.Students)
.WithMany(e => e.Courses)
.Map(m => m.ToTable("StudentCourse").MapLeftKey("CourseId").MapRightKey("StudentId"));
}
}now i will explain my problem. once the entity class has been generated following the above steps if any new fields or existing fields changes in db table then tell me how could i update or reflect that change into my entity class ?
if any new table added in db how could i add that table in my entity class ?
i am using EF code first approach for existing db. the same problem is not there in EF db first approach. there is option by which we can update our entity but the same kind of option i am not getting for EF code first.
so please tell me how to handle this situation for EF Code First for existing db. thanks