示例#1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, ManagingContext ctx)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseCors("AllowAll");

            ctx.Database.EnsureCreated();

            app.UseMvc();
        }
示例#2
0
 public ProjectRepositoryEF(ManagingContext context)
 {
     _context = context;
 }
 public CustomersController(ManagingContext context)
 {
     _context = context;
 }
示例#4
0
 public ContactRepositoryEF(ManagingContext context)
 {
     _contaxt = context ?? throw new ArgumentNullException(nameof(context));
 }