public IActionResult Get() /*POSTMAN OK*/ { List <UserDetailed> userList = _userRepo.GetAll().Select(x => x.DalToDetailedUserApi()).ToList(); if (!(userList is null)) { foreach (UserDetailed user in userList) { user.Contacts = _contactRepo.GetByUserId(user.Id).Select(x => x.DalToForUserApi()); if (user.Contacts.Count() == 0) { user.Contacts = null; } user.Lunches = _lunchRepo.GetByUserId(user.Id).Select(x => x.DaltoSimplifiedApi()); if (user.Lunches.Count() == 0) { user.Lunches = null; } } return(Ok(userList)); }