Posted on: 2/4/2014 1:33:52 PM | Views : 618

I am trying to get data and count feature to show up on the client-side by calling - api/test/name=storm, but I am expericing error on the following code below:
int SelectedRows = data.Count(); var mes = string.Format("{0} found of results"); return Request.CreateResponse(HttpStatusCode.OK, new { mes, SelectedRows, data }); Test class method:
public HttpResponseMessage Get([FromUri] Query query) { var data = db.database.AsQueryable(); int page = 0; int pageSize = 10; if (query.name != null) { data = data.Where(c => c.Name == query.name); } if (!data.Any()) { var message = string.Format("No data was found"); return Request.CreateErrorResponse(HttpStatusCode.No ...

Go to the complete details ...