public JsonData Countries(CountryFilter filter)
 {
     try
     {
         using (var db = new DataContext())
         {
             var data = filter.ReportBuildQuery(db.Countries).OrderBy(x => x.Name).ToList();
             return !data.Any() ? DataHelpers.ReturnJsonData(null, false, "No Data Found", 0) : DataHelpers.ReturnJsonData(data, true, "Loaded successfully", data.Count());
         }
     }
     catch (Exception e)
     {
         return DataHelpers.ExceptionProcessor(e);
     }
 }
 public JsonData Get(long id)
 {
     try
     {
         var filter = new CountryFilter { Id = id };
         using (var db = new DataContext())
         {
             var data = filter.BuildQuery(db.Countries).ToList();
             return !data.Any() ? DataHelpers.ReturnJsonData(null, false, "No Data Found", 0) : DataHelpers.ReturnJsonData(data, true, "Loaded successfully", 1);
         }
     }
     catch (Exception e)
     {
         return DataHelpers.ExceptionProcessor(e);
     }
 }
 public JsonData Get(CountryFilter filter)
 {
     return new CountryRepo().Get(filter);
 }