Exemplo n.º 1
0
        private static BookingDayDataModel From(BookingDay entity)
        {
            var dataModelId = entity.Id.Value;

            var dataModel = new BookingDayDataModel
            {
                Id       = dataModelId,
                Bookings = From(entity.Bookings)
            };

            return(dataModel);
        }
Exemplo n.º 2
0
        private static BookingDay From(BookingDayDataModel dataModel)
        {
            if (dataModel == null)
            {
                return(null);
            }

            var entityId = BookingDayId.With(dataModel.Id);

            var entity = new BookingDay(entityId, From(dataModel.Bookings));

            return(entity);
        }