예제 #1
0
        public object Put(SaveUser request)
        {
            var success = _userManager.Update(request.User);

            var issues = _messageBusService.Fetch().Select(m => m.Details); ;

            return new ServiceResult<User>
            {
                Success = success,
                Result = request.User,
                Errors = issues
            };
        }
예제 #2
0
        public object Post(SaveUser request)
        {
            int id;
            var success = _userManager.Create(request.User, out id);

            if (success)
                request.User.ID = id;

            var issues = _messageBusService.Fetch().Select(m => m.Details); ;

            return new ServiceResult<User>
            {
                Success = success,
                Result = request.User,
                Errors = issues
            };
        }