[HttpGet]
public JsonResult
ShowAllMstStocklistScheme()
{
var v = PR.ShowAllMstStocklistScheme().Select(p =>
new { p.ID, p.Scheme });
return Json(v, JsonRequestBehavior.AllowGet);
}
in code "new { p.ID, p.Scheme }" is declare column name or table property name which you want to access through this query.
Some problem arise when we going to bind dropdown in kendo from a table which has a foreign key realtion. That time we need to access specific column from table.
we can use this way of return from LINQ data.
No comments:
Post a Comment