hello all,
i knew its easy to return JsonResult type of data from controller but, is it possible from WebApi because, i have written below code
[HttpGet] [Route("api/GetMyData")] public JsonResult GetMyData(string strFromDate, string strToDate) { /*some db operation*/ return Json(new { myOutput = "test"}); }
im getting exception as "Using the generic type 'JsonResult<T>' requires 1 type arguments"
experts please help me to resolve this exception?
thanks in advance