예제 #1
0
 public UnitOfWork(MealPrepPlannerWebApp_DatabaseContext context,
                   IRepository <Meal> mealRepository,
                   IRepository <Ingredient> ingredientRepository,
                   IRepository <Unit> unitRepository)
 {
     _context             = context;
     MealRepository       = mealRepository;
     IngredientRepository = ingredientRepository;
     UnitRepository       = unitRepository;
 }
예제 #2
0
 public Repository(MealPrepPlannerWebApp_DatabaseContext context)
 {
     _context = context;
     _dbSet   = context.Set <T>();
 }