protected SqliteDatabaseInMemory() { _connection = new SqliteConnection(InMemorySqliteConnectionString); _connection.Open(); var options = new DbContextOptionsBuilder <BillContext>().UseSqlite(_connection).Options; billContext = new BillContext(options); billContext.Database.EnsureCreated(); }
public static async void Initialize() { using (var db = new BillContext()) { await db.Database.EnsureCreatedAsync(); db.Bills.Add(new Bill() { Name = "Rent" }); db.SaveChanges(); } }
public BillingRepo(BillContext context) { _context = context; }
static async Task SeedBillContext(BillContext context, IServiceProvider services) { context.EnsureEnumeration <BillStatus>(); await context.SaveChangesAsync(); }
public HomeController(ILogger <HomeController> logger, BillContext db) { _logger = logger; }
public CustomerController(UserManager <JPSUser> _userManager, BillContext context) { this.userManager = _userManager; _context = context; }
public BillMeasuresController(BillContext context) { _context = context; }
public BillController(BillContext context) { _context = context; }
public DbInitializer(BillContext _billContext) { this._billContext = _billContext; }
public BillPageModel(BillContext context) { Context = context; }
public AddBillModel(BillContext context) { Context = context; }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, BillContext context) { loggerFactory.AddConsole(Configuration.GetSection("Logging")); loggerFactory.AddDebug(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseBrowserLink(); } else { app.UseExceptionHandler("/Home/Error"); } app.UseStaticFiles(); app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller=Home}/{action=Index}/{id?}"); }); //DbInitializer.Initialize(context); }
public SuppliersController(BillContext context) { _context = context; }
public ViewYearlyModel(BillContext context) : base(context) { }
public ProductsController(BillContext context) { _context = context; }
public StatisticsController(BillContext context) { _context = context; }
public PREMISE_DETAILSController(BillContext context) { _context = context; }
public BillController(BillContext dbContext) { this.dbContext = dbContext; }
public MonthSum(BillContext _context) { context = _context; }
public BillPurchasesController(BillContext context) { _context = context; }
public Bill_InformationController(UserManager <JPSUser> _userManager, BillContext context) { this.userManager = _userManager; _context = context; }