Bhaskar Shelar

Bhaskar Shelar

  • NA
  • 41
  • 2.4k

Code First Apporch instead of existing Model First Apporch

Nov 3 2016 1:28 AM

In  Existing project implementation done from edmx model first approach EF I have to use Code First approach . In existing project ,It   creating  Using repository BO ,base Bo ,Enum classes . Have to reflect the same with just change in approach. 

In Exiting they used ObjectContext , createobjectSet,, they have created a objectcontext ,readonly ObjectSet<T> objestset & assigned like this  

objectset = repositoryBOSql.Context.CreateObjectSet<T>();

 Context :- object of connection ,
I have to use Dbcontext  to all over & have to also revert to everywhere, & also have to pass the entityObject (Dbset object) to all so that just replacement in  RepositoryBo,baseBo I will able to convert All project from model first to code first Apporch .
 
 
 

Answers (2)