コード例 #1
0
 public UnitOfWork(HotelContext context)
 {
     this.context        = context ?? throw new System.ArgumentNullException(nameof(context));
     Users               = new UserRepository(context);
     BookingOffers       = new BookingOfferRepository(context);
     Offers              = new OfferRepository(context);
     BookingRoomServices = new BookingRoomServiceRepository(context);
     BookingRooms        = new BookingRoomRepository(context);
     Services            = new ServiceRepository(context);
     RoomFeatures        = new RoomFeatureRepository(context);
     Features            = new FeatureRepository(context);
     RoomImages          = new RoomImageRepository(context);
     Rooms               = new RoomRepository(context);
 }