Home > Mobile >  Model Reference to another project ASP.NET MVC
Model Reference to another project ASP.NET MVC

Time:05-20

There is a completed ASP.NET MVC project.

In that project, it already has the company employee main data.

So I want to create another project but, I don't think that creating another table in this new project for the employees and again saving the same details is an unnecessary thing.

So is there any way of accessing those data from another project?

As Example,

Project 1 has a model called EmployeeMain and this project has CRM_UAT Database.

Project 2 need to access the model called EmployeeMain from project 1 to create user accounts and save them in the DCS_UAT database.

So how can I handle this kind of things?

CodePudding user response:

Create a separate project to handle the data access. and referencing that project with your project 1 and project 2 would be a good practice.

You may also look into clean architecture and repository pattern will give you a good idea.

enter image description here

  • Related