Exemplo n.º 1
0
        public HttpResponseMessage GetAllUsers()
        {
            HttpResponseMessage response = new HttpResponseMessage(HttpStatusCode.OK);

            UserPrincipal    loggedInUser = (UserPrincipal)HttpContext.Current.User;
            List <Account>   accounts     = AccountBLL.GetAllUsers(loggedInUser.AccountSession.ClubId);
            List <UserModel> users        = UserModel.MapUserModels(accounts, false, true);

            response.Content = new ObjectContent <List <UserModel> >(users, new JsonMediaTypeFormatter());

            return(response);
        }