Code sample for EF core model / repository and unit of work
Posted: Thu 10 Aug 2017 09:16
Hello,
i have generate an EF core model of my database first and i have add the "repository and unit of work" Template. The wizard have done the job and now i tried to understand how to use the repository class in my project. Is there a place with project sample code that explain the use of the repository partern :
- How to use the unit of work ?
- How and where define the dbcontext in my project (web api) with dependance injection ?
- What is the EntityFrameworkUnitOfWorkFactory ?
In conclusion, is there some code help for the "repository and unit of work" ?
Thank's
i have generate an EF core model of my database first and i have add the "repository and unit of work" Template. The wizard have done the job and now i tried to understand how to use the repository class in my project. Is there a place with project sample code that explain the use of the repository partern :
- How to use the unit of work ?
- How and where define the dbcontext in my project (web api) with dependance injection ?
- What is the EntityFrameworkUnitOfWorkFactory ?
In conclusion, is there some code help for the "repository and unit of work" ?
Thank's