public async Task<EditFeedResponse> AddFeedAsync(FeedDto feed) { var response = new EditFeedResponse(); try { var now = DateTime.Now; var newFeed = new Feed { Class = feed.Class, Mappings = feed.Mappings, Created = now, Updated = now }; var addedArticle = this.feedRepository.Insert(newFeed); await this.unitOfWork.CommitAsync(); response.Status = ResponseStatus.OK; } catch (Exception ex) { //this.logService.LogError(ex, new HttpContextWrapper(HttpContext.Current)); response.Status = ResponseStatus.SystemError; } return response; }
public async Task <EditFeedResponse> AddFeedAsync(FeedDto feed) { var response = new EditFeedResponse(); try { var now = DateTime.Now; var newFeed = new Feed { Class = feed.Class, Mappings = feed.Mappings, Created = now, Updated = now }; var addedArticle = this.feedRepository.Insert(newFeed); await this.unitOfWork.CommitAsync(); response.Status = ResponseStatus.OK; } catch (Exception ex) { //this.logService.LogError(ex, new HttpContextWrapper(HttpContext.Current)); response.Status = ResponseStatus.SystemError; } return(response); }