コード例 #1
0
 public RolesController(MyComicListContext context, IAddRole addCommand, IUpdateRole updateCommand, IDeleteRole deleteCommand)
 {
     Context            = context;
     this.addCommand    = addCommand;
     this.updateCommand = updateCommand;
     this.deleteCommand = deleteCommand;
 }
コード例 #2
0
 public IActionResult Put(int id, [FromBody] RoleDto dto, [FromServices] IUpdateRole command)
 {
     dto.Id = id;
     _executor.ExecuteCommand(command, dto);
     return(NoContent());
 }