Esempio n. 1
0
        public async Task <IHttpActionResult> GetAllUsersAsync()
        {
            try
            {
                IEnumerable <UserDTO> users = await _manager.GetAllUsersAsync();

                return(users.GetEnumerator().Current != null?Json(users) : (IHttpActionResult)BadRequest("no users found!"));;
            }
            catch (Exception ex) { return(InternalServerError(ex)); }
        }