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

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