简体   繁体   中英

Add DAL project to Web API (Restful) project

I have a Web API project used as a restful web service.

I add all my bean (POCO) classes into the Model folder.

Now I want to add another project that should be the DAL to my whole solution.

I need the DAL to know my bean classes but also that my Web API project will reference to my DAL project - and this of course make a circular dependency.

What am I doing wrong? Do I have to put all my Bean in other project?

What did I miss here?

It's not good idea to have reference from DAL to Web project. But if you really need it you can create your POCO classes in Model folder inherited from some interfaces and put interfaces to third library.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM