public GroupResource(IEntityById entityById, IUpdateGroupCommand updateGroupCommand, IDeleteGroupCommand deleteGroupCommand, ITopicsByGroup topicsByGroup, IGroupByName groupByName) { this.entityById = entityById; this.updateGroupCommand = updateGroupCommand; this.deleteGroupCommand = deleteGroupCommand; this.topicsByGroup = topicsByGroup; this.groupByName = groupByName; }
public GroupsController(IAddGroupCommand addGroupCommand, IEditGroupCommand editGroupCommand, IDeleteGroupCommand deleteGroupCommand, IPagingViewModelGenerator pagingViewModelGenerator, IGetGroupQuery getGroupQuery) { _addGroupCommand = addGroupCommand; _editGroupCommand = editGroupCommand; _deleteGroupCommand = deleteGroupCommand; _pagingViewModelGenerator = pagingViewModelGenerator; _getGroupQuery = getGroupQuery; }
public GroupController( IGenericJsonPagedQuery genericJsonPagedQuery, IEntityById entityById, ICreateGroupCommand createGroupCommand, IUpdateGroupCommand updateGroupCommand, IDeleteGroupCommand deleteGroupCommand ) { this.genericJsonPagedQuery = genericJsonPagedQuery; this.entityById = entityById; this.createGroupCommand = createGroupCommand; this.updateGroupCommand = updateGroupCommand; this.deleteGroupCommand = deleteGroupCommand; }
public IActionResult Delete(int id, [FromServices] IDeleteGroupCommand command) { _executor.ExecuteCommand(command, id); return(StatusCode(StatusCodes.Status204NoContent)); }
public IActionResult Delete(int id, [FromServices] IDeleteGroupCommand command) { _executor.ExecuteCommand(command, id); return(NoContent()); }