I study Onion Architecture for quite sometime now, I've analysed few sample VS's solutions and still can't understand the difference between Core
and Domain
in Onion Architecture
.
- In this solution Core (project) is inside Domain (solution folder).
- Here there is no Core, only Domain
- In Jeffrey Palermo's CodeCampServer sample app, there is Domain inside Core. So, basically it looks like
Core
is made ofDomain
andServices
. - In this xDriven project
Core
is divided intoCore.Application
andCore.Domain
I'm totally confused. Can you explain me, what's the actual difference between Core
and Domain
in such architecture?
I have for example this class. Simple board game, like tic-tac-toe. It's definitely ubiquitous language, so should I create it in Entities
folder inside Domain? And domain itself in Core?
public class Game
{
public GameState State { get; set; }
public Board Board { get; set; }
public IEnumerable<Player> Players { get; set; }
public bool Move(int playerId, int field)
{
//Check if Player's move will finish game. If yes, return true
return false;
}
}