public static RoomLocation Create(string code, string description) { var obj = new RoomLocation { Description = description, Code = code }; return(obj); }
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 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); }