Esempio n. 1
0
        public object Put(SavePage request)
        {
            var success = _pageManager.Update(request.Page);

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

            return new ServiceResult<Page>
            {
                Success = success,
                Result = request.Page,
                Errors = issues
            };
        }
Esempio n. 2
0
        public object Post(SavePage request)
        {
            int id;
            var success = _pageManager.Create(request.Page, out id);

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

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

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