示例#1
0
            public async Task <Guid> Handle(CreateJobTitleCommand request, CancellationToken cancellationToken)
            {
                _logger.LogInformation("Creating job title {@Name}, {@Description}", request.Name, request.Description);

                var jobTitle = new JobTitle(
                    id: Guid.NewGuid(),
                    name: request.Name,
                    description: request.Description);

                await _jobTitleRepository.Create(jobTitle);

                return(jobTitle.Id);
            }
示例#2
0
 public bool Create(JobTitle department)
 {
     return(jobTitleRep.Create(department));
 }