コード例 #1
0
        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();
        }
コード例 #2
0
        // 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();
        }
コード例 #3
0
 public GiftController(GiftContext context)
 {
     _context = context;
 }
コード例 #4
0
ファイル: EfUnitOfWork.cs プロジェクト: gurkangul/RandomGift
 public EfUnitOfWork(GiftContext _dbContext)
 {
     dbContext = _dbContext ?? throw new ArgumentNullException("dbcontext can not be null");
 }