select * from Employees where DataofJoin ='2005-01-01 00:00:00.000'
I wrote this Linq Query as
public JsonResult Dif()
{
var ss = Convert.ToDateTime("2001-01-01 00:00:00.000");
var x = (from n in db.Employees
where n.DataofBirth == ss
select n).First();
return new JsonResult { JsonRequestBehavior = JsonRequestBehavior.AllowGet };
}
But its throwing the following error:
"An exception of type 'System.InvalidOperationException' occurred in System.Core.dll
but was not handled in user code"