Root entity creation is a static class
public static School Create(string name, Action<ILabEvent> eventHandler)
because there isn't an object to bind it to.
But for child entities (lets take Room as a child of School)- if the user is adding a new room, when they press submit, should the controller instantiate a new School, and replay all its events before calling the AddRoom(room) method to get an event returned to save in the database? Is there a less intensive way of handling it?
Root entity creation is a static class
public static School Create(string name, Action<ILabEvent> eventHandler)
because there isn't an object to bind it to. But for child entities (lets take Room as a child of School)- if the user is adding a new room, when they press submit, should the controller instantiate a new School, and replay all its events before calling the AddRoom(room) method to get an event returned to save in the database? Is there a less intensive way of handling it?