示例#1
0
 public static EventEntity MakeEventEntity(UpdateDepartmentCmd cmd)
 {
     return(new EventEntity {
         UserId = cmd.UserId,
         Body = new DepartmentUpdatedEvt(cmd)
     });
 }
示例#2
0
        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));
        }
示例#3
0
 public DepartmentUpdatedEvt(UpdateDepartmentCmd cmd)
 {
     Id   = cmd.Id;
     Name = cmd.Name;
 }