Methoun Ahmed

Methoun Ahmed

  • 1.9k
  • 145
  • 62.1k

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)