public GetUser_ResultSet GetUserById(GetUser_Input input)
        {
            var db   = new StoredProcContext();
            var user = db.GetUserById.CallStoredProc(input).ToList <GetUser_ResultSet>().FirstOrDefault();

            return(user);
        }
        public List <GetRoleAssignedToUser_ResultSet> GetRolesAssginedToUser(GetUser_Input input)
        {
            var db = new StoredProcContext();

            List <GetRoleAssignedToUser_ResultSet> assignedRoles = db.GetRolesAssignedToUser.CallStoredProc(input).ToList <GetRoleAssignedToUser_ResultSet>();

            return(assignedRoles);
        }
示例#3
0
        public async Task <IHttpActionResult> GetUserById(int userId)
        {
            GetUser_Input input = new GetUser_Input()
            {
                UserId = userId
            };

            var user = _accountService.GetUserById(input);

            return(Ok(user));
        }
示例#4
0
        public async Task <IHttpActionResult> GetRolesAssignedToUser(int userId)
        {
            GetUser_Input input = new GetUser_Input()
            {
                UserId = userId
            };

            var roles = _accountService.GetRolesAssginedToUser(input);


            return(Ok(roles));
        }