public IHttpActionResult GetLast(string meter)
 {
     if (GetRoles == string.Empty || User.IsInRole(GetRoles))
     {
         try
         {
             using (AdoDataConnection connection = new AdoDataConnection(Connection))
             {
                 IEnumerable <MiMDDailyStatistic> result = new TableOperations <MiMDDailyStatistic>(connection).QueryRecordsWhere("Meter = {0}", meter);
                 MiMDDailyStatistic statistic            = null;
                 if (result.Any())
                 {
                     statistic = result.OrderBy(x => x.Date).Last();
                 }
                 return(Ok(statistic));
             }
         }
         catch (Exception ex)
         {
             return(InternalServerError(ex));
         }
     }
     else
     {
         return(Unauthorized());
     }
 }