public HomeController(GiftContext context) { BaseEndPoint = new Uri("https://localhost:44340/api/Gift"); BaseEndPointGirls = new Uri("https://localhost:44340/api/Gift/Girls"); BaseEndPointBoys = new Uri("https://localhost:44340/api/Gift/Boys"); _context = context; _httpClient = new HttpClient(); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, GiftContext giftContext) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } giftContext.EnsureSeedDataForContext(); app.UseMvc(); }
public GiftController(GiftContext context) { _context = context; }
public EfUnitOfWork(GiftContext _dbContext) { dbContext = _dbContext ?? throw new ArgumentNullException("dbcontext can not be null"); }