1
Answer

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

Methoun Ahmed

Methoun Ahmed

6y
211
1
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)