private async Task <ApplicationUserList> GetRecords() { var dbRec = await _context.ApplicationUser.Where(u => u.UserName != User.Identity.Name).ToListAsync(); ApplicationUserList records = new ApplicationUserList { UserHandler = _userHandler, Users = _mapper.Map <List <ApplicationUser>, List <ApplicationUserModel> >(dbRec) }; return(records); }
public ApplicationUserDTO Get(string login, int?userID) { ApplicationUserList lstUser = ApplicationUserList.ValidateUser(login.Trim(), userID); if (lstUser.Count > 0) { return(lstUser[0].CurrentDTO); } return(null); //if (lstUser.Count > 0) //{ // return lstUser[0].CurrentDTO; //} return(null); }