I have my C# project separated in several projects, so each will become a separate
I have one project for my
Model and one for my
Model is responsible for Business Logic and objects representations of what's in the Data Base.
Data is responsible for creating the Data Base and general ORM operations. I also have a
Desktop project that uses both
Data to interact with the user in a WPF Windows program.
Data has a reference to
Model since it needs the objects in
Model to create the DB for the ORM.
I wanted to add Business Logic into my models so they can be added to the DB, such as
Person.Add() will add that person object instance to the DB, but When I add the
Data project to the
Model project as a reference Visual Studio says it can't be done since this will make a circular reference (which I agree).
How do you usually treat this cases? Is it there a way to keep this kind of projects decoupled or is it normal to merge
Model into one project?