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 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 Put(int id, [FromBody] GroupDto dto, [FromServices] IUpdateGroupCommand command) { dto.Id = id; _executor.ExecuteCommand(command, dto); return(StatusCode(StatusCodes.Status204NoContent)); }
public void Put(int id, [FromBody] GroupDto dto, [FromServices] IUpdateGroupCommand command) { dto.Id = id; _executor.ExecuteCommand(command, dto); }