Example #1
0
       public async Task<IHttpActionResult> GetCalves()
       {
           var calfService = new CalfDataService();
           var processingResult = await calfService.getCalves(LoggedInUser.ClientID);
           if (!processingResult.IsSuccessful)
           {
               processingResult.Error = new ProcessingError("An error occurred while getting all available Calves.", "Could not retrieve Calves, please try again. If the problem persists contact support.", true);
               return Ok(processingResult);
           }
 
           processingResult.Data = processingResult.Data.OrderBy(c => c.TagNumber).ToList();
           return Ok(processingResult);
       }