Ejemplo n.º 1
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;
 }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }