public async Task <IActionResult> Create([FromBody] CreateDepartmentReq req) { var department = req.toEntity(); await departmentRepo.Create(department); return(Created($"/api/departments/${department.Id}", department)); }
public CreateDepartmentCmd(CreateDepartmentReq req, long userId) { UserId = userId; Name = req.Name; }