示例#1
0
 public TagsController(IGetTagsCommand getTags,
                       IGetTagCommand getTag,
                       IAddTagCommand addTag, IEditTagCommand editTag, IDeleteTagCommand deleteTag)
 {
     _getTags   = getTags;
     _getTag    = getTag;
     _addTag    = addTag;
     _editTag   = editTag;
     _deleteTag = deleteTag;
 }
 public IActionResult Get(int id, [FromServices] IGetTagCommand command)
 {
     try
     {
         return(Ok(executor.ExecuteQuery(command, id)));
     }
     catch (EntityNotFoundException)
     {
         return(NotFound());
     }
 }