コード例 #1
0
 private async Task <CreateClassroomFromLocationDto> CreateClassroomAsync(CreateLocationItemDto locationDto)
 {
     return(await SendAsync(new CreateClassroomFromLocationCommand
     {
         IsEnabled = true,
         Name = "Classroom1",
         Capacity = 40,
         LocationId = locationDto.Id
     }));
 }
コード例 #2
0
        private async Task <CreateCourseClassItemDto> CreateCourseClassAsync(CreateCourseItemDto courseItemDto, CreateLocationItemDto locationItemDto)
        {
            var createCourseClassCommand = new CreateCourseClassItemCommand()
            {
                Name       = $"{courseItemDto.Id}-class1",
                CourseId   = courseItemDto.Id,
                LocationId = locationItemDto.Id,
                Capacity   = 40,
            };

            return(await SendWithValidationAsync(createCourseClassCommand, new CreateCourseClassItemCommandValidator()));
        }