Ejemplo n.º 1
0
        public IActionResult GetByName(string name)
        {
            var colors   = ColorsRepository.Get();
            var response = colors.Where(x => x.Name.ToLower() == name.ToLower()).FirstOrDefault();

            return(Ok(response));
        }
Ejemplo n.º 2
0
 public UnitOfWork(WebStoreContext context)
 {
     this.context   = context;
     Products       = new ProductsRepository(context);
     Sliders        = new SlidersRepository(context);
     FooterMenus    = new FooterMenusRepository(context);
     HeadingMenus   = new HeadingMenusRepository(context);
     Polls          = new PollsRepository(context);
     Prices         = new PricesRepository(context);
     ProductVariant = new ProductVariantsRepository(context);
     Colors         = new ColorsRepository(context);
     Votes          = new VotesRepository(context);
     Options        = new OptionsRepository(context);
     Ratings        = new RatingsRepository(context);
     Ordered        = new OrderedRepository(context);
     Orders         = new OrdersRepository(context);
 }
Ejemplo n.º 3
0
        public IActionResult GetAllColors()
        {
            var colors = ColorsRepository.Get();

            return(Ok(colors));
        }