Пример #1
0
 public UserService(EBuyDbContext context,
                    UserManager <User> userManager,
                    IMapper mapper)
 {
     this.context     = context;
     this.userManager = userManager;
     this.mapper      = mapper;
 }
Пример #2
0
 public CommentService(EBuyDbContext context,
                       IUserService userService,
                       IMapper mapper)
 {
     this.context     = context;
     this.userService = userService;
     this.mapper      = mapper;
 }
Пример #3
0
 public CategoryService(EBuyDbContext context,
                        ICloudinaryService cloudinaryService,
                        IMapper mapper)
 {
     this.context           = context;
     this.cloudinaryService = cloudinaryService;
     this.mapper            = mapper;
 }
Пример #4
0
        public static EBuyDbContext GetContext()
        {
            var dbOptions = new DbContextOptionsBuilder <EBuyDbContext>()
                            .UseInMemoryDatabase(Guid.NewGuid().ToString())
                            .Options;

            var context = new EBuyDbContext(dbOptions);

            return(context);
        }
Пример #5
0
 public OrderService(EBuyDbContext context,
                     IMapper mapper,
                     IUserService userService,
                     IProductService productService)
 {
     this.context        = context;
     this.mapper         = mapper;
     this.userService    = userService;
     this.productService = productService;
 }
Пример #6
0
 public MessageService(EBuyDbContext context,
                       IMapper mapper,
                       IUserService userService,
                       IEmailSender emailSender)
 {
     this.context     = context;
     this.mapper      = mapper;
     this.userService = userService;
     this.emailSender = emailSender;
 }
Пример #7
0
 public RegisterModel(
     UserManager <User> userManager,
     ILogger <RegisterModel> logger,
     IEmailSender emailSender,
     EBuyDbContext context)
 {
     _userManager = userManager;
     _logger      = logger;
     _emailSender = emailSender;
     this.context = context;
 }
Пример #8
0
 public ProductService(EBuyDbContext context,
                       ICloudinaryService cloudinaryService,
                       IMapper mapper,
                       ICategoryService categoryService,
                       IUserService userService)
 {
     this.context           = context;
     this.cloudinaryService = cloudinaryService;
     this.mapper            = mapper;
     this.categoryService   = categoryService;
     this.userService       = userService;
 }
Пример #9
0
 public PurchaseService(EBuyDbContext context,
                        IMapper mapper)
 {
     this.context = context;
     this.mapper  = mapper;
 }
Пример #10
0
 public MessageServiceTests()
 {
     this.context = TestStartup.GetContext();
 }
Пример #11
0
 public PurchaseServiceTests()
 {
     this.context = TestStartup.GetContext();
 }
Пример #12
0
 public UserServiceTests()
 {
     this.context = TestStartup.GetContext();
 }
Пример #13
0
 public CategoryServiceTests()
 {
     this.context = TestStartup.GetContext();
 }
Пример #14
0
 public CommentServiceTests()
 {
     this.context = TestStartup.GetContext();
 }
Пример #15
0
 public ProductServiceTests()
 {
     this.context = TestStartup.GetContext();
 }