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); }
// 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(); }); }
public Apartment(ApartmentDbContext context) { _context = context; }
public HouseRepository(ApartmentDbContext Context) : base(Context) { }
public BlockRepository(ApartmentDbContext Context) : base(Context) { }
public AroundProviderProductRepository(ApartmentDbContext Context) : base(Context) { }
public Baserepository(ApartmentDbContext Context) { //context = new BookingFoodContext(); context = Context; this.dbSet = context.Set <TEntity>(); }
public AroundProviderCategoryRepository(ApartmentDbContext Context) : base(Context) { }
public UserRepository(ApartmentDbContext Context) : base(Context) { }