Пример #1
0
 public NewsController(IGetNewsCommand getNewsCommand, IGetNewCommand getNewCommand, IAddNewsCommand addNewsCommand, IDeleteNewsCommand deleteNewsCommand, IEditNewsCommand editNewsCommand)
 {
     _getNewsCommand    = getNewsCommand;
     _getNewCommand     = getNewCommand;
     _addNewsCommand    = addNewsCommand;
     _deleteNewsCommand = deleteNewsCommand;
     _editNewsCommand   = editNewsCommand;
 }
Пример #2
0
 public NewsController(IGetNewsCommand getNewsCommand, IGetNewCommand getNewCommand, IAddNewsCommand addNewsCommand, IEditNewsCommand editNewsCommand, IDeleteNewsCommand deleteNewsCommand, IGetCategoriesCommand getCategoriesCommand, IHostingEnvironment hostingEnvironment, UserDto user)
 {
     _getNewsCommand       = getNewsCommand;
     _getNewCommand        = getNewCommand;
     _addNewsCommand       = addNewsCommand;
     _editNewsCommand      = editNewsCommand;
     _deleteNewsCommand    = deleteNewsCommand;
     _getCategoriesCommand = getCategoriesCommand;
     _hostingEnvironment   = hostingEnvironment;
     _user = user;
 }
Пример #3
0
 public CommentController(IGetNewsCommand getNewsCommand, IGetCommentsCommand getCommentsCommand, IGetCommentCommand getCommentCommand, IAddCommentCommand addComment, IDeleteCommentCommand deleteCommentCommand, IEditCommentCommand editCommentCommand, IEmailSender emailSender, NewsContext context, IHostingEnvironment hostingEnvironment)
 {
     _getNewsCommand       = getNewsCommand;
     _getCommentsCommand   = getCommentsCommand;
     _getCommentCommand    = getCommentCommand;
     _addComment           = addComment;
     _deleteCommentCommand = deleteCommentCommand;
     _editCommentCommand   = editCommentCommand;
     _emailSender          = emailSender;
     _context            = context;
     _hostingEnvironment = hostingEnvironment;
 }
 public async Task <OperationResultResponse <NewsResponse> > Get(
     [FromServices] IGetNewsCommand command,
     [FromQuery] Guid newsId)
 {
     return(await command.ExecuteAsync(newsId));
 }