public ActionResult LoadGrid() { var status = "error"; try { if (!Authenticated) { status = "SESSION EXPIRED"; } else { //var item = (from i in db.Items // join // c in db.Categories // on // i.CategoryId equals c.Id // join // sc in db.SubCategories // on // i.SubCategoryId equals sc.Id // join // u in db.UnitOfMeasures // on // i.UomId equals u.Id // select // new // { // UID = i.UID, // Name = i.Name, // Barcode = i.Barcode, // CategoryName = c.Name, // SubCategoryName = sc.Name, // UomName = u.Name, // Comment = i.Description, // }); var item = db.LoadProductBarcode(); status = JsonConvert.SerializeObject(item); } } catch (Exception ex) { ApplicationExceptionLogging(ex.Message, ex.StackTrace, "BarcodeManagement", "LoadGrid"); } return(Content(status)); }