Ejemplo n.º 1
0
 public RecipeViewModel()
 {
     _entities = new DbContextFactory().GetFitnessRecipeEntities();
     _authorRepository = new AuthorRepository(_entities);
     _categoryRepository = new CategoryRepository(_entities);
     _mealIngredientRepository = new MealIngredientRepository(_entities);
     _dietRepository = new DietRepository(_entities);
 }
Ejemplo n.º 2
0
        public UnitOfWork(FitnessRecipiesEntities context)
        {
            if (context == null)
            {
                throw new ArgumentNullException("Context was not supplied");
            }

            _context = context;
        }
 public IngredientViewModel()
 {
     _entities = new DbContextFactory().GetFitnessRecipeEntities();
     _recipeRepository = new RecipeRepository(_entities);
 }