Beispiel #1
0
        public object Put(SaveSection request)
        {
            var success = _pageManager.Update(request.Section);

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

            return new ServiceResult<Section>
            {
                Success = success,
                Result = request.Section,
                Errors = issues
            };
        }
Beispiel #2
0
        public object Post(SaveSection request)
        {
            int id;
            var success = _pageManager.Create(request.Section, out id);

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

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

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