Beispiel #1
0
 private IEnumerable <User> FilterCompanyId(UsersSearchQuery usersSearchQuery, IEnumerable <User> users)
 {
     if (usersSearchQuery.CompanyId.HasValue)
     {
         users = users.Where(user => (user.Company.Id == usersSearchQuery.CompanyId.Value));
     }
     return(users);
 }
Beispiel #2
0
 private IEnumerable <User> FilterRowStatus(UsersSearchQuery usersSearchQuery, IEnumerable <User> users)
 {
     if (usersSearchQuery.RowStatus.HasValue)
     {
         users = users.Where(user => (user.RowStatus == usersSearchQuery.RowStatus.Value));
     }
     return(users);
 }
Beispiel #3
0
        // GET api/user/?comapnyId={comapnyId}
        public IEnumerable <User> GetByCompanyId(int comapnyId)
        {
            var usersSearchQuery = new UsersSearchQuery();

            usersSearchQuery.CompanyId = comapnyId;

            var result = m_userManager.GetEntities(usersSearchQuery);

            return(result);
        }