public ActionResult GetData()
        {
            var lst  = _db.GetAll().ToList();
            var data = lst.Select(s => new
            {
                s.FurnitureId,
                s.Code,
                s.Name,
                s.CountryOfOrigin,
                s.Year,
                Category       = s.Category.Name,
                FurnitureSalon = s.FurnitureSalon.Name,
                s.Amount,
                s.Price
            });

            return(this.Json(data, JsonRequestBehavior.AllowGet));
        }
示例#2
0
 public IEnumerable <FurnitureItemModel> GetAll()
 {
     return(FurnitureRepo.GetAll());
 }