Methoun Ahmed

Methoun Ahmed

  • NA
  • 145
  • 102k

Cannot implicity convert type'System.web.Mvc.JsonResult

Nov 18 2017 3:02 AM
How to solved the problem.
Cannot implicity convert type'System.web.Mvc.JsonResult 'to 'System.Action 
 
*****Here is my code******** 
  public Action GetEmployee()
{
using (MyDatabaseEntities dc = new MyDatabaseEntities())
{
var employees = dc.Employees.OrderBy(a => a.FirstName).ToList();
return Json(new { data = employees }, JsonRequestBehavior.AllowGet);
}
}

Answers (1)