public UserService(CookingSystemDbContext context, IMapper mapper, UserManager <IdentityUser> userManager) { this.mapper = mapper; this.context = context; this.userManager = userManager; }
public static CookingSystemDbContext GetContext() { var options = new DbContextOptionsBuilder <CookingSystemDbContext>() .UseInMemoryDatabase(Guid.NewGuid().ToString()).Options; var dbContext = new CookingSystemDbContext(options); return(dbContext); }
public ImagesController(CookingSystemDbContext context, IWebHostEnvironment webHostEnvironment, IMapper mapper, IRecipeService recipes, IImageSevice images) { this.context = context; this.webHostEnvironment = webHostEnvironment; this.mapper = mapper; this.recipes = recipes; this.images = images; }
public RecipesController(IRecipeService recipes, IMapper mapper, IUserService userService, UserManager <IdentityUser> userManager, ApplicationDbContext context, IWebHostEnvironment webHostEnvironment, CookingSystemDbContext appContext, ICategoryService categories, IImageSevice images, ICommentService comments) { this.recipes = recipes; this.mapper = mapper; this.userService = userService; this.userManager = userManager; this.context = context; this.webHostEnvironment = webHostEnvironment; this.appContext = appContext; this.categories = categories; this.images = images; this.comments = comments; }
public CommentService(CookingSystemDbContext context) { this.context = context; }
public CategoryService(CookingSystemDbContext context) { this.context = context; }
public void Setup() { this.context = MockDbContext.GetContext(); this.categoryService = new CategoryService(this.context); }
public ImageService(CookingSystemDbContext context) { this.context = context; }
public ArticleService(CookingSystemDbContext context) => this.context = context;
public RecipeService(CookingSystemDbContext context) { this.context = context; }
public void Setup() { this.context = MockDbContext.GetContext(); this.recipeService = new RecipeService(this.context); }