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