public GardenController(GardenDbContext context)
        {
            _context = context;

            // temporary
            if (_context.Plants.Count() == 0)
            {
                _context.Plants.Add(new Plant {
                    Name = "Tomato"
                });
                _context.SaveChanges();
            }
        }
Exemple #2
0
 public AddPlantCharacteristicsCommandHandler(IMapper mapper, GardenDbContext dbContext)
 {
     _mapper    = mapper;
     _dbContext = dbContext;
 }
 public PlantKnowledgeRepository(GardenDbContext dbContext)
 {
     _dbContext = dbContext;
 }