public static IHost InitializeDatabase(this IHost appHost)
        {
            using (var scope = appHost.Services.CreateScope())
            {
                var services = scope.ServiceProvider;

                IConfiguration    config = services.GetRequiredService <IConfiguration>();
                IHostEnvironment  env    = services.GetService <IHostEnvironment>();
                WCAProjectContext db     = services.GetRequiredService <WCAProjectContext>();

                db.Database.EnsureCreated();
                db.Database.Migrate();
            }
            return(appHost);
        }
示例#2
0
 public ZplatformController(WCAProjectContext context)
 {
     _context = context;
 }
 public ZhearaboutController(WCAProjectContext context)
 {
     _context = context;
 }
示例#4
0
 public HomeController(ILogger <HomeController> logger, WCAProjectContext context)
 {
     _logger  = logger;
     _context = context;
 }
 public ZstatusController(WCAProjectContext context)
 {
     _context = context;
 }
示例#6
0
 public ZopotherController(WCAProjectContext context)
 {
     _context = context;
 }
 public ClientServicesController(WCAProjectContext context)
 {
     _context = context;
 }
 public ZschoolController(WCAProjectContext context)
 {
     _context = context;
 }
 public ZinsuranceController(WCAProjectContext context)
 {
     _context = context;
 }
 public ZprogramsController(WCAProjectContext context)
 {
     _context = context;
 }
 public ScaScreenController(WCAProjectContext context)
 {
     _context = context;
 }
 public ZresourcereasonController(WCAProjectContext context)
 {
     _context = context;
 }
示例#13
0
 public ZyesnoController(WCAProjectContext context)
 {
     _context = context;
 }
示例#14
0
 public ZcaresreasonController(WCAProjectContext context)
 {
     _context = context;
 }
示例#15
0
 public ZworkerController(WCAProjectContext context)
 {
     _context = context;
 }
示例#16
0
 public ZinternalcategoryController(WCAProjectContext context)
 {
     _context = context;
 }
 public ZcountyController(WCAProjectContext context)
 {
     _context = context;
 }
示例#18
0
 public ClineitemsController(WCAProjectContext context)
 {
     _context = context;
 }
示例#19
0
 public ZraceController(WCAProjectContext context)
 {
     _context = context;
 }
示例#20
0
 public ZactionController(WCAProjectContext context)
 {
     _context = context;
 }
 public ZreferralsourceController(WCAProjectContext context)
 {
     _context = context;
 }