public void Update(string number, RoomType type, BedType bedType, RoomLocation location, RoomExposure exposure) { RoomNumber = number; RoomType = type; RoomTypeId = type.Id; BedType = bedType; BedTypeId = bedType.Id; RoomLocation = location; RoomLocationId = location.Id; }
public static BedType Create(string code, string description) { AssertionConcern.AssertArgumentNotNull(description, "The Bed Type description must be provided."); AssertionConcern.AssertArgumentLength(description, 100, "The Bed Type description maximum is 100 characters."); AssertionConcern.AssertArgumentNotNull(code, "The Bed Type Code must be provided."); AssertionConcern.AssertArgumentLength(code, 10, "The Bed Type Code maximum is 10 characters."); var bedType = new BedType { Description = description, Code = code }; return(bedType); }
public static RoomInfo Create( string number, RoomType type, BedType bedType, RoomLocation location, RoomExposure exposure) { var room = new RoomInfo { RoomNumber = number, RoomType = type, RoomTypeId = type.Id, BedType = bedType, BedTypeId = bedType.Id, RoomLocation = location, RoomLocationId = location.Id, }; return(room); }
public static RoomInfo Create( string number, RoomType type, BedType bedType, RoomLocation location) { var room = new RoomInfo { RoomNumber = number, RoomType = type, RoomTypeId = type.Id, BedType = bedType, BedTypeId = bedType.Id, RoomLocation = location, RoomLocationId = location.Id, }; // Add the AddRoomInfoAddedDomainEvent to the domain events collection // to be raised/dispatched when comitting changes into the Database [ After DbContext.SaveChanges() ] room.AddRoomInfoAddedDomainEvent(); return(room); }