Beispiel #1
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));
        }
 public UpdateDepartmentCmd(long id, UpdateDepartmentReq req, long userId)
 {
     UserId = userId;
     Id     = id;
     Name   = req.Name;
 }