protected SqliteDatabaseInMemory()
        {
            _connection = new SqliteConnection(InMemorySqliteConnectionString);
            _connection.Open();
            var options = new DbContextOptionsBuilder <BillContext>().UseSqlite(_connection).Options;

            billContext = new BillContext(options);
            billContext.Database.EnsureCreated();
        }
예제 #2
0
        public static async void Initialize()
        {
            using (var db = new BillContext())
            {
                await db.Database.EnsureCreatedAsync();

                db.Bills.Add(new Bill()
                {
                    Name = "Rent"
                });
                db.SaveChanges();
            }
        }
예제 #3
0
 public BillingRepo(BillContext context)
 {
     _context = context;
 }
예제 #4
0
 static async Task SeedBillContext(BillContext context, IServiceProvider services)
 {
     context.EnsureEnumeration <BillStatus>();
     await context.SaveChangesAsync();
 }
예제 #5
0
 public HomeController(ILogger <HomeController> logger, BillContext db)
 {
     _logger = logger;
 }
예제 #6
0
 public CustomerController(UserManager <JPSUser> _userManager, BillContext context)
 {
     this.userManager = _userManager;
     _context         = context;
 }
 public BillMeasuresController(BillContext context)
 {
     _context = context;
 }
예제 #8
0
 public BillController(BillContext context)
 {
     _context = context;
 }
예제 #9
0
 public DbInitializer(BillContext _billContext)
 {
     this._billContext = _billContext;
 }
예제 #10
0
 public BillPageModel(BillContext context)
 {
     Context = context;
 }
예제 #11
0
 public AddBillModel(BillContext context)
 {
     Context = context;
 }
예제 #12
0
        // 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);
        }
예제 #13
0
 public SuppliersController(BillContext context)
 {
     _context = context;
 }
예제 #14
0
 public ViewYearlyModel(BillContext context) : base(context)
 {
 }
예제 #15
0
 public ProductsController(BillContext context)
 {
     _context = context;
 }
 public StatisticsController(BillContext context)
 {
     _context = context;
 }
예제 #17
0
 public PREMISE_DETAILSController(BillContext context)
 {
     _context = context;
 }
예제 #18
0
 public BillController(BillContext dbContext)
 {
     this.dbContext = dbContext;
 }
예제 #19
0
 public MonthSum(BillContext _context)
 {
     context = _context;
 }
예제 #20
0
 public BillPurchasesController(BillContext context)
 {
     _context = context;
 }
예제 #21
0
 public Bill_InformationController(UserManager <JPSUser> _userManager, BillContext context)
 {
     this.userManager = _userManager;
     _context         = context;
 }