public OwnerVsLocationContract[] FindOwnerVsLocation(OwnerVsLocationDiscriminator o, LocationDiscriminator l, UserProfileDiscriminator p)
 {
     try
     {
         using (var records = RepositoryFactory.GetOwnerVsLocation())
         {
             records.Discriminator  = o;
             records.LocationFilter = l;
             return(records.Select(r => new OwnerVsLocationContract()
             {
                 OwnerVsLocation = r
             }).ToArray());
         }
     }
     catch (Exception ex)
     {
         HandleMyException(ex);
         return(null);
     }
 }
 public LocationContract[] FindLocation(LocationDiscriminator d, OwnerVsLocationDiscriminator o, UserProfileDiscriminator u)
 {
     try
     {
         using (var records = RepositoryFactory.GetLocation())
         {
             records.Discriminator         = d;
             records.OwnerVsLocationFilter = o;
             records.UserProfileFilter     = u;
             return(records.Select(r => new LocationContract()
             {
                 Location = r
             }).ToArray());
         }
     }
     catch (Exception ex)
     {
         HandleMyException(ex);
         return(null);
     }
 }