public static EventEntity MakeEventEntity(UpdateDepartmentCmd cmd) { return(new EventEntity { UserId = cmd.UserId, Body = new DepartmentUpdatedEvt(cmd) }); }
public async Task <IActionResult> Update(long id, [FromBody] UpdateDepartmentReq req) { var updateCmd = new UpdateDepartmentCmd(id, req, HttpContext.UserId().Value); var department = await departmentRepo.Update(updateCmd); return(Ok(department)); }
public DepartmentUpdatedEvt(UpdateDepartmentCmd cmd) { Id = cmd.Id; Name = cmd.Name; }