public async Task <bool> Handle(CreateRoomInfoCommand message) { // Add/Update the Buyer AggregateRoot // DDD patterns comment: Add child entities and value-objects through the Order Aggregate-Root // methods and constructor so validations, invariants and business logic // make sure that consistency is preserved across the whole aggregate string number = message.RoomInfo.RoomNumber; RoomType type = message.RoomInfo.RoomType; BedType bedType = message.RoomInfo.BedType; RoomLocation location = message.RoomInfo.RoomLocation; var room = RoomInfo.Create(number, type, bedType, location); _propertyContext.Add(room); return(await _propertyContext.SaveEntitiesAsync()); }