I'm working on a ASP.NET MVC project with Entity Framework, and I want to return value of one field from an database, and I won't to return full record, just value of one field.
This what I try :
public JsonResult DUR_json(string FL)
{
var R = from F in DB_Context.Con.FLs where F.CODE_FL == FL select F.DUR_FL.First();
return Json(new { DUR = R });
}
But this code returns the full record, please any help ? Thanks in advance.