Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Enterprise Multi layer Web Application in ASP.NET Core

$
0
0

Hi All,

I am working on enterprise application where I have separated BusinessEntities(Class Library .Net Core), DataModel(Class Library .Net Core), BusinessServices (Class Library .Net Core) and ASP.NET Razor Pages application.

Firstly, I am trying to achieve my application should be totally loosely coupled and also Data Model should be inaccessible (not require to add reference) to Presentation Layer (Razor Pages app). 

Two things I need to discuss:

  1. I added reference of DataModel to BusinessServices and BusinessServices to ASP.NET Razor Pages app (UI Presentation). But, still I could access the DataModel by adding namespace of DataModel. Is it okay? Since, in ASP.NET MVC (.Net Framework) you wont be able to even add the namespace of DataModel unless you Add reference of project. 
  2.  I am facing problem in resolving the DataModel Class & Interface. Since I cannot access in UI/Startup.cs, how can I resolve UnitOfWork and IUnitOfWork in BusinessServices. Like I do in startup.cs as :
  services.AddTransient<IDepartmentServices, DepartmentServices>();

So, in this case also do I need to explicitly create a new project Resolver to resolve the dependencies?


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>