Пример #1
0
 public long GetFindProfilesCount(Profile profile, FindProfilesParams param)
 {
     return FindProfilesQuery(profile, param).Count();
 }
Пример #2
0
 private IQueryable<Profile> FindProfilesQuery(Profile profile, FindProfilesParams param)
 {
     return this.Profiles
         .Where(m => m.New == false)
         .Where(m => m.ProfileId != profile.ProfileId)
         .Include(m=>m.Intereses)
         .OrderByDescending(m => m.LastName)
         .AsQueryable();
 }
Пример #3
0
 public List<Profile> FindProfiles(Profile profile, FindProfilesParams param)
 {
     List<Profile> result;
     var query = FindProfilesQuery(profile, param);
     if (param.Take != 0)
     {
         query = query.Skip(param.Skip).Take(param.Take);
     }
     result = query.ToList();
     return result;
 }