Sunil Singh

Sunil Singh

  • NA
  • 45
  • 617

Which one is better approach among Entity Fram code first ap

Jan 22 2016 1:19 PM

In ASP.Net MVC we can create ENTITY FRAMEWORK through CODE FIRST approach by both ways like FluentApi (with OnModelCreating() method) and migration script like Enable-Migration Nuget command?

Both of them give same result. I can see both can create same DB schema successfully. At least I cannot find any difference. But is there any advantages of Nuget command migration script approach than FluentApi? Or vice versa?

Which one gives better result?

Some times I see even in FluentApi few people has used Enable-Migration command but that is not necessary. Am I wrong in saying this?

Which single approach is most popular? Nuget command Migration script or FluentApi?

Thanks in advance?


Answers (2)