Exemple #1
0
 public async Task <HttpResponseMessage> GetDetailsByDateTime(DateTime date)
 {
     /// check for null date
     try
     {
         var csvData = new CsvData();
         // id there is a db this can asychronus call
         var details = csvData.DataConvertor();
         // we can convert the details object to Json here
         return(Request.CreateResponse(System.Net.HttpStatusCode.OK, FilterData(details, date)));
     }
     catch (Exception ex) {
         return(new HttpResponseMessage(System.Net.HttpStatusCode.InternalServerError));
     }
 }