ASP.NET 5, wanted to separate an entity structure from a web project

I am trying to achieve below application structure

App.Model - UserModel - OrderModel

App.Service - UserService - IUserService

App.Entity - DbContext

The site — WebAPI — invokes the service

Most ASP.NET 5 sample applications initialize the entity structure in the website launch file. e.g. .AddEntityFrameowrk () .. etc.

You need to know how we can split Entity into a separate project and how we initiate DBContext if we call the repository from the Service Project. (since the startup file is not available for the class library)

+4
source share
1 answer

ASP.NET ( ). EF - - API, EF

"domain", -, API.

, :

: #, . ""

API: -API. EF . API , . , ASP.NET core 1.0 RC1, -api , "-" , , .. , API

-: -. "-", HttpClient , api . " api", , . , JSON .net

0

Source: https://habr.com/ru/post/1629681/


All Articles