예제 #1
0
 public UnitOfWork(ApartmentDbContext dbContext)
 {
     this._dbContext             = dbContext;
     this.User                   = new UserRepository(this._dbContext);
     this.House                  = new HouseRepository(this._dbContext);
     this.Block                  = new BlockRepository(this._dbContext);
     this.AroundProvider         = new AroundProviderRepository(this._dbContext);
     this.AroundProviderProduct  = new AroundProviderProductRepository(this._dbContext);
     this.AroundPrividerCategory = new AroundProviderCategoryRepository(this._dbContext);
 }
예제 #2
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ApartmentDbContext context)
        {
            context.Database.EnsureCreated();

            app.UseCors(policyString);

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseRouting();

            app.UseAuthorization();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
            });
        }
예제 #3
0
 public Apartment(ApartmentDbContext context)
 {
     _context = context;
 }
예제 #4
0
 public HouseRepository(ApartmentDbContext Context) : base(Context)
 {
 }
예제 #5
0
 public BlockRepository(ApartmentDbContext Context) : base(Context)
 {
 }
 public AroundProviderProductRepository(ApartmentDbContext Context) : base(Context)
 {
 }
예제 #7
0
 public Baserepository(ApartmentDbContext Context)
 {
     //context = new BookingFoodContext();
     context    = Context;
     this.dbSet = context.Set <TEntity>();
 }
 public AroundProviderCategoryRepository(ApartmentDbContext Context) : base(Context)
 {
 }
예제 #9
0
 public UserRepository(ApartmentDbContext Context) : base(Context)
 {
 }