public IActionResult OnGet(string id = "")
 {
     Goods = new Models.Goods();
     if (!string.IsNullOrEmpty(id))
     {
         var criteria = new Core.Models.Goods.Criteria(id, string.Empty);
         var goods    = _goodsRepo.Get(criteria).FirstOrDefault();
         Goods = new Models.Goods
         {
             Id    = goods?.ID,
             Name  = goods?.GoodsName,
             Price = goods?.GoodsPrice ?? 0
         };
     }
     return(Page());
 }
Пример #2
0
        public void OnGet()
        {
            var criteria = new M.Criteria(string.Empty, string.Empty);

            Goodses = _goodsRepo.Get(criteria).ToList();
        }