Esempio n. 1
0
        public IActionResult GetAll()
        {
            passport = CommonMethod.GetPassport(Request);
            ResultModel result = new ResultModel(true, service.GetAll(passport));

            return(new ObjectResult(result));
        }
Esempio n. 2
0
        public IActionResult Index()
        {
            var goods = _repository.GetAll();

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

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