I assume that you already have an Entity Framework model in your database (if not, then you need to do some reading, the answer from @AvkashChauhan will really be a good starting point).
However, if you have a model and all configurations, for example:
protected override void OnModelCreating(DbModelBuilder modelBuilder) { modelBuilder.Configurations.Add(new YourEntityMap()); }
and all object mappings, such as:
public class YourEntityMap : EntityTypeConfiguration<YourEntity> { public YourEntityMap() { this.HasKey(t => t.Id); } }
and you still do not use the darn flag, you can do the following steps:
Go to Tools > NuGet Package Manager > Package Manager Console

Then in the console write
Enable-Migrations -ContextTypeName Company.Models.YourDevContext
where Company.Models.YourDevContext is your database context (the search for a class that inherits from DbContext should be the same as OnModelCreating override).
after running the command you should get something like:

At this point, you should have the Migrations folder added to the solution more about how to handle migrations here
Hope this saves you some time.
source share