Exemplo n.º 1
0
        public IActionResult GetAllUsers()
        {
            IQueryable<LedgerIdentityUser> users = _userApplicationService.GetAllUsers();

            return CreateResponse(users.Select(user => new  
            {
                id = user.Id,
                email = user.Email,
                userName = user.UserName,
            }));
        }
Exemplo n.º 2
0
        private async Task <SelectList> LoadUsers()
        {
            var allUsers = await _userApplicationService.GetAllUsers();

            Dictionary <Guid, string> dictUsers = new Dictionary <Guid, string>();

            allUsers.ForEach(x => {
                dictUsers.Add(x.Id, x.Name);
            });

            SelectList users = new SelectList(
                dictUsers.Select(x => new { Value = x.Key, Text = x.Value }),
                "Value",
                "Text"
                );

            return(users);
        }
Exemplo n.º 3
0
        public async Task <ActionResult <List <UserResponseViewModel> > > GetAll()
        {
            var users = await _userApplicationService.GetAllUsers();

            return(Response(users));
        }