예제 #1
0
        public static RoomLocation Create(string code, string description)
        {
            var obj = new RoomLocation {
                Description = description, Code = code
            };

            return(obj);
        }
예제 #2
0
 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;
 }
예제 #3
0
        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);
        }
예제 #4
0
        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);
        }