Пример #1
0
        public IActionResult GetAll()
        {
            passport = CommonMethod.GetPassport(Request);
            ResultModel result = new ResultModel(true, service.GetAll(passport));

            return(new ObjectResult(result));
        }
Пример #2
0
        public IActionResult Index()
        {
            var goods = _repository.GetAll();

            var viewModel = goods.Select(x => new GoodsViewModel(x));

            return(View(viewModel));
        }
Пример #3
0
 public IEnumerable <GoodViewModel> Get()
 {
     return(_goodsRepository.GetAll().Select(x => new GoodViewModel(x)).ToList());
 }
Пример #4
0
 public async Task <List <Good> > GetGoods()
 {
     return(await _goodRepo.GetAll());
 }
Пример #5
0
 public ActionResult Index(short id = 1)
 {
     return(View("Index", new PageInfo <Good>(_goods.GetAll().Count(), totalPerPage, id)));
 }
Пример #6
0
 public Task <List <Goods> > GetAll()
 {
     return(_goodsRepository.GetAll());
 }