static void CreatePatients(InventoryContext context)
        {
            var beers = new List<Beer>();

            var beer = new Beer
            {
                Name = "Amanda Silver",
                //Picture = GetPatientPicture(0),
                Created = DateTime.Now
            };
            beers.Add(beer);

            context.Beers.AddRange(beers);
            context.SaveChanges();
        }
 public BeersRepository(InventoryContext dbcontext)
 {
     _context = dbcontext;
 }
        static async Task CreateSampleData(IServiceProvider serviceProvider, InventoryContext context)
        {
            _serviceProvider = serviceProvider;

            CreateSampleData(context);
        }
 private static void CreateSampleData(InventoryContext context)
 {
     CreatePatients(context);
 }
 public UserController(InventoryContext inventory)
 {
     inventoryContext = inventory;
 }
Beispiel #6
0
        protected static IQueryable <UserAccount> GetAccount(string username, string password, InventoryContext dbContext)
        {
            var account = from a in dbContext.UserAccounts
                          where a.Username == username && a.Password == password
                          select a;

            return(account);
        }
 public TokenController(IConfiguration config, InventoryContext context)
 {
     _configuration = config;
     _context       = context;
 }
Beispiel #8
0
 public AuthController(IConfiguration config, InventoryContext context, IMapper mapper)
 {
     _configuration = config;
     _context       = context;
     _mapper        = mapper;
 }
Beispiel #9
0
 public AccountingBatteriesController(InventoryContext context)
 {
     _context = context;
 }
 public ProductsController(InventoryContext context)
 {
     _context = context;
 }
 public CategoryQuery(ShopContext context, DiscountContext discountContext, InventoryContext inventoryContext)
 {
     _context          = context;
     _discountContext  = discountContext;
     _inventoryContext = inventoryContext;
 }
Beispiel #12
0
 public SlotsController(InventoryContext context, ILogger <SlotsController> logger)
 {
     _context = context;
     _logger  = logger;
 }
 public CollectionsController(InventoryContext db)
 {
     _db = db;
 }