Ejemplo n.º 1
0
        public async Task SeedAsync(SellMeDbContext dbContext, IServiceProvider serviceProvider)
        {
            var roleManager = serviceProvider.GetRequiredService <RoleManager <IdentityRole> >();
            var userManager = serviceProvider.GetRequiredService <UserManager <SellMeUser> >();

            await SeedRoleAsync(roleManager, userManager, GlobalConstants.AdministratorRoleName);
        }
Ejemplo n.º 2
0
        public async Task SeedAsync(SellMeDbContext dbContext, IServiceProvider serviceProvider)
        {
            if (dbContext == null)
            {
                throw new ArgumentNullException(nameof(dbContext));
            }

            if (serviceProvider == null)
            {
                throw new ArgumentNullException(nameof(serviceProvider));
            }

            var logger = serviceProvider.GetService <ILoggerFactory>().CreateLogger(typeof(SellMeDbContextSeeder));

            var seeders = new List <ISeeder>
            {
                new RolesSeeder(),
                new CategoriesSeeder(),
                new SubcategoriesSeeder(),
                new ConditionsSeeder(),
                new PromotionsSeeder()
            };

            foreach (var seeder in seeders)
            {
                await seeder.SeedAsync(dbContext, serviceProvider);

                await dbContext.SaveChangesAsync();

                logger.LogInformation($"Seeder {seeder.GetType().Name} done.");
            }
        }
Ejemplo n.º 3
0
 public MessagesService(SellMeDbContext context, IAdsService adsService, IUsersService usersService, IMapper mapper)
 {
     this.adsService   = adsService;
     this.mapper       = mapper;
     this.usersService = usersService;
     this.context      = context;
 }
Ejemplo n.º 4
0
        public async Task SeedAsync(SellMeDbContext dbContext, IServiceProvider serviceProvider)
        {
            if (await dbContext.Categories.AnyAsync())
            {
                return;
            }

            //TODO: Export into constants
            await dbContext.Categories.AddAsync(new Category { Name = "Auto", FontAwesomeIcon = "fas fa-car-alt", CreatedOn = DateTime.UtcNow });

            await dbContext.Categories.AddAsync(new Category { Name = "Sport/Books/Hobby", FontAwesomeIcon = "fas fa-running", CreatedOn = DateTime.UtcNow });

            await dbContext.Categories.AddAsync(new Category { Name = "Animals", FontAwesomeIcon = "fas fa-paw", CreatedOn = DateTime.UtcNow });

            await dbContext.Categories.AddAsync(new Category { Name = "Electronics", FontAwesomeIcon = "fas fa-desktop", CreatedOn = DateTime.UtcNow });

            await dbContext.Categories.AddAsync(new Category { Name = "Services", FontAwesomeIcon = "fas fa-hammer", CreatedOn = DateTime.UtcNow });

            await dbContext.Categories.AddAsync(new Category { Name = "Real Estate", FontAwesomeIcon = "fas fa-home", CreatedOn = DateTime.UtcNow });

            await dbContext.Categories.AddAsync(new Category { Name = "House & Garden", FontAwesomeIcon = "fas fa-couch", CreatedOn = DateTime.UtcNow });

            await dbContext.Categories.AddAsync(new Category { Name = "Work", FontAwesomeIcon = "fas fa-suitcase-rolling", CreatedOn = DateTime.UtcNow });

            await dbContext.Categories.AddAsync(new Category { Name = "Tourism", FontAwesomeIcon = "fas fa-mountain", CreatedOn = DateTime.UtcNow });

            await dbContext.Categories.AddAsync(new Category { Name = "Baby", FontAwesomeIcon = "fas fa-baby-carriage", CreatedOn = DateTime.UtcNow });

            await dbContext.Categories.AddAsync(new Category { Name = "Fashion", FontAwesomeIcon = "fas fa-tshirt", CreatedOn = DateTime.UtcNow });

            await dbContext.Categories.AddAsync(new Category { Name = "Machines/Tools", FontAwesomeIcon = "fas fa-tools", CreatedOn = DateTime.UtcNow });
        }
Ejemplo n.º 5
0
 public StatisticsService(SellMeDbContext context, IAdsService adsService, IUsersService usersService, IPromotionsService promotionsService)
 {
     this.context           = context;
     this.adsService        = adsService;
     this.usersService      = usersService;
     this.promotionsService = promotionsService;
 }
Ejemplo n.º 6
0
        private static ConditionsService InitializeConditionsService(SellMeDbContext context)
        {
            MapperInitializer.InitializeMapper();

            ConditionsService service = new ConditionsService(context);

            return(service);
        }
Ejemplo n.º 7
0
        private static CategoriesService InitializeCategoriesService(SellMeDbContext context)
        {
            MapperInitializer.InitializeMapper();

            CategoriesService service = new CategoriesService(context);

            return(service);
        }
Ejemplo n.º 8
0
        public async Task SeedAsync(SellMeDbContext dbContext, IServiceProvider serviceProvider)
        {
            if (await dbContext.Conditions.AnyAsync())
            {
                return;
            }

            await dbContext.AddAsync(new Condition
                                     { Name = GlobalConstants.ConditionBrandNewName, CreatedOn = DateTime.UtcNow });

            await dbContext.AddAsync(new Condition
                                     { Name = GlobalConstants.ConditionUsedName, CreatedOn = DateTime.UtcNow });
        }
Ejemplo n.º 9
0
 public AdsService(SellMeDbContext context, IAddressesService addressesService, IUsersService usersService,
                   ICategoriesService categoriesService, IUpdatesService updatesService,
                   ISubCategoriesService subCategoriesService, IMapper mapper, ICloudinaryService cloudinaryService)
 {
     this.context              = context;
     this.addressesService     = addressesService;
     this.usersService         = usersService;
     this.categoriesService    = categoriesService;
     this.updatesService       = updatesService;
     this.subCategoriesService = subCategoriesService;
     this.mapper            = mapper;
     this.cloudinaryService = cloudinaryService;
 }
Ejemplo n.º 10
0
        public async Task SeedAsync(SellMeDbContext dbContext, IServiceProvider serviceProvider)
        {
            if (await dbContext.Promotions.AnyAsync())
            {
                return;
            }

            await dbContext.Promotions.AddAsync(new Promotion
                                                { Type = "silver", Price = 3.50M, Updates = 3, ActiveDays = 10, CreatedOn = DateTime.UtcNow });

            await dbContext.Promotions.AddAsync(new Promotion
                                                { Type = "gold", Price = 8.00M, Updates = 10, ActiveDays = 30, CreatedOn = DateTime.UtcNow });
        }
Ejemplo n.º 11
0
        public static SellMeDbContext CreateContextForInMemory()
        {
            var option = new DbContextOptionsBuilder <SellMeDbContext>()
                         .UseInMemoryDatabase(databaseName: Guid.NewGuid().ToString()).Options;

            var context = new SellMeDbContext(option);

            if (context != null)
            {
                context.Database.EnsureDeleted();
                context.Database.EnsureCreated();
            }

            return(context);
        }
Ejemplo n.º 12
0
 public ConditionsService(SellMeDbContext context)
 {
     this.context = context;
 }
Ejemplo n.º 13
0
 public UsersService(SellMeDbContext context, IHttpContextAccessor contextAccessor, UserManager <SellMeUser> userManager)
 {
     this.contextAccessor = contextAccessor;
     this.userManager     = userManager;
     this.context         = context;
 }
Ejemplo n.º 14
0
 public ReviewsService(SellMeDbContext context, IUsersService usersService)
 {
     this.usersService = usersService;
     this.context      = context;
 }
Ejemplo n.º 15
0
 public AddressesService(SellMeDbContext context)
 {
     this.context = context;
 }
Ejemplo n.º 16
0
 public UpdatesService(SellMeDbContext context)
 {
     this.context = context;
 }
Ejemplo n.º 17
0
        public async Task SeedAsync(SellMeDbContext dbContext, IServiceProvider serviceProvider)
        {
            if (await dbContext.SubCategories.AnyAsync())
            {
                return;
            }

            //Subcategories for Vehicles
            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Wheels/Tyres", CategoryId = 1, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Auto Parts", CategoryId = 1, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Accessories", CategoryId = 1, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Auto Services", CategoryId = 1, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Trucks", CategoryId = 1, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Trailers/Wagons", CategoryId = 1, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Automobiles", CategoryId = 1, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Motorcycles", CategoryId = 1, CreatedOn = DateTime.UtcNow });

            //Subcategories for Sport/books/hoby

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Sport Goods", CategoryId = 2, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Tourism/Camping", CategoryId = 2, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Books", CategoryId = 2, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Music", CategoryId = 2, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Movies", CategoryId = 2, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Tickets/Events", CategoryId = 2, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Games", CategoryId = 2, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Musical Instruments", CategoryId = 2, CreatedOn = DateTime.UtcNow });

            //Subcategories for Animals
            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Dogs", CategoryId = 3, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Cats", CategoryId = 3, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Fishes", CategoryId = 3, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Birds", CategoryId = 3, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Movies", CategoryId = 3, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Farm Animals", CategoryId = 3, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Other Pets", CategoryId = 3, CreatedOn = DateTime.UtcNow });

            //Subcategories for Electronics
            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Computers", CategoryId = 4, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Computer Accessories/Reparing Parts", CategoryId = 4, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Tablets", CategoryId = 4, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Phones", CategoryId = 4, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Phones Accessories/Reparing Parts", CategoryId = 4, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "TVs", CategoryId = 4, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Audio", CategoryId = 4, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Home appliances", CategoryId = 4, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Air Conditioners", CategoryId = 4, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Photo/Video", CategoryId = 4, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Navigation", CategoryId = 4, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Others", CategoryId = 4, CreatedOn = DateTime.UtcNow });


            //Subcategories for services
            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Garden Services", CategoryId = 5, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Cosmetic Services", CategoryId = 5, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Baby Sitters", CategoryId = 5, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Animal Services", CategoryId = 5, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Courses", CategoryId = 5, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Trainings/Dancing", CategoryId = 5, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Sewing Services", CategoryId = 5, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Medical Services", CategoryId = 5, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Auto Services", CategoryId = 5, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Building Services", CategoryId = 5, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Transporting Services", CategoryId = 5, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Business Services", CategoryId = 5, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Wedding Services", CategoryId = 5, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Security Services", CategoryId = 5, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Others", CategoryId = 5, CreatedOn = DateTime.UtcNow });

            //Subcategories for Real Estate
            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Selling", CategoryId = 6, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Rents", CategoryId = 6, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Roommates", CategoryId = 6, CreatedOn = DateTime.UtcNow });


            //Subcategories for home and garden
            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Furniture", CategoryId = 7, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Workman", CategoryId = 7, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Art", CategoryId = 7, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Household Goods", CategoryId = 7, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Curtains/Carpets", CategoryId = 7, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Lighting", CategoryId = 7, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Garden", CategoryId = 7, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Cleaning Goods", CategoryId = 7, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Others", CategoryId = 7, CreatedOn = DateTime.UtcNow });

            //Subcategories for work
            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Hotels/Tourism", CategoryId = 8, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Production/Building", CategoryId = 8, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Trade", CategoryId = 8, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Health/Beauty", CategoryId = 8, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Cleaning", CategoryId = 8, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Transport/Logistic", CategoryId = 8, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Administration", CategoryId = 8, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Security", CategoryId = 8, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Information Technology", CategoryId = 8, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Economics/Law", CategoryId = 8, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Advertising/Marketing", CategoryId = 8, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Other", CategoryId = 8, CreatedOn = DateTime.UtcNow });

            //Subcategories for tourism

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Sea", CategoryId = 9, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Mountain", CategoryId = 9, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Guest House", CategoryId = 9, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "SPA", CategoryId = 9, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Economics/Law", CategoryId = 9, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Abroad", CategoryId = 9, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Other", CategoryId = 9, CreatedOn = DateTime.UtcNow });

            //Subcategories for baby
            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Clothes", CategoryId = 10, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Shoes", CategoryId = 10, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Guest House", CategoryId = 10, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Baby Strollers", CategoryId = 10, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Toys", CategoryId = 10, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Furniture", CategoryId = 10, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Accessories", CategoryId = 10, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Others", CategoryId = 10, CreatedOn = DateTime.UtcNow });

            //Subcategories for fashion
            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Clothes", CategoryId = 11, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Shoes", CategoryId = 11, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Accessories", CategoryId = 11, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "jewelery", CategoryId = 11, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Watches", CategoryId = 11, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Perfumery/Cosmetics", CategoryId = 11, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Others", CategoryId = 11, CreatedOn = DateTime.UtcNow });

            //Subcategories for machines/tools
            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Industrial Equipment", CategoryId = 12, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Machines", CategoryId = 12, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Tools", CategoryId = 12, CreatedOn = DateTime.UtcNow });

            await dbContext.SubCategories.AddAsync(new SubCategory
                                                   { Name = "Others", CategoryId = 12, CreatedOn = DateTime.UtcNow });
        }
Ejemplo n.º 18
0
 public PromotionsService(SellMeDbContext context, IAdsService adsService)
 {
     this.adsService = adsService;
     this.context    = context;
 }
Ejemplo n.º 19
0
 public CategoriesService(SellMeDbContext context)
 {
     this.context = context;
 }
Ejemplo n.º 20
0
 public FavoritesService(SellMeDbContext context, IUsersService usersService)
 {
     this.context      = context;
     this.usersService = usersService;
 }