Code sample for EF core model / repository and unit of work

Code sample for EF core model / repository and unit of work

Postby vinz » 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
vinz
 
Posts: 11
Joined: Fri 16 Jan 2015 12:51

Re: Code sample for EF core model / repository and unit of work

Postby Shalex » Fri 11 Aug 2017 10:57

There is no Devart sample code for the "Repository And Unit of Work" template. We recommend you to follow standard tutorials and use the code generated by templates shipped with Entity Developer (instead of creating the code manually). For example: https://docs.microsoft.com/en-us/aspnet/core/tutorials/first-web-api.

JIC:
* manage model templates via the Templates node in Model Explorer
* the Devart templates include the *Output properties to specify a folder for the generated code
Shalex
Devart Team
 
Posts: 7654
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle