private void ActionView() { Console.Clear(); Console.WriteLine("Users in database:"); var users = BLL.GetAll(); foreach (var item in users) { PrintUserData(item); } }
public ResponseBody <List <sline_member> > GetAllUser() { var list = _IUserBLL.GetAll(); return(new ResponseBody <List <sline_member> > { Result = list, Code = "", Message = "" }); }
public IActionResult GetAllUser() { try { return(Ok(userBLL.GetAll().Data)); } catch (Exception ex) { throw new Exception(ex.Message); } }
public IActionResult Get() { List <UserDto> userDtos = new List <UserDto>(); List <User> users = userBLL.GetAll().ToList(); foreach (User item in users) { userDtos.Add(new UserDto() { UserID = item.ID, UserName = item.UserName, EMail = item.Email, Role = item.Role.ToString(), IsActive = item.IsActive }); } return(Ok(userDtos)); }
private void ShowUsers() { System.Console.WriteLine("ID|Name|Age"); foreach (var user in _userBLL.GetAll()) { System.Console.WriteLine(user); System.Console.WriteLine("User's awards:"); Dictionary <int, List <int> > awardIdUserIDs = _awardBLL.GetDictionaryOfAwardsAndUsers(); foreach (var item in awardIdUserIDs) { if (item.Value.Contains(user.ID)) { System.Console.WriteLine(_awardBLL.GetById(item.Key)); } } System.Console.WriteLine(); } }
public ActionResult List() { // return View(); return(View(userBLL.GetAll())); }
public IActionResult GetUserAll() { List <User> users = userBLL.GetAll().ToList(); return(Ok(ConvertDtoList(users))); }