コード例 #1
0
 public IHttpActionResult Post(Employee newEmployee)
 {
     mediator.Send(new SaveEmployeeCommand(newEmployee));
     return Ok();
 }
コード例 #2
0
 public IHttpActionResult Put(int id, Employee employee)
 {
     mediator.Send(new UpdateEmployeeCommand(id, employee));
     return Ok();
 }
コード例 #3
0
 public SaveEmployeeCommand(Employee newEmployee)
 {
     this.Employee = newEmployee;
 }