public async Task ShouldCreateClassroomFromLocation()
        {
            var createLocationDto = await SendAsync(new CreateLocationItemCommand
            {
                Name        = "location1",
                IsEnabled   = true,
                OpeningTime = new TimeSpan(0, 19, 0),
                ClosingTime = new TimeSpan(0, 21, 0),
            });

            CreateClassroomFromLocationCommand command = new CreateClassroomFromLocationCommand
            {
                IsEnabled  = true,
                Name       = "Classroom1",
                Capacity   = 40,
                LocationId = createLocationDto.Id
            };
            CreateClassroomFromLocationDto dto = await SendWithValidationAsync(command, new CreateClassroomFromLocationCommandValidator());

            var created = await ExecuteDbContextAsync(db => db.Classrooms.Where(c => c.Id.Equals(dto.Id)).SingleOrDefaultAsync());

            created.ShouldNotBeNull();
            created.LocationId.ShouldBe(createLocationDto.Id);
            created.Capacity.ShouldBe(command.Capacity);
            created.Name.ShouldBe(command.Name);
            created.IsEnabled.ShouldBe(command.IsEnabled);
        }
        public async Task <ActionResult <Guid> > CreateClassroomFromLocation(LocationClassroomCreateRequest request, Guid locationId)
        {
            var itemCommand = new CreateClassroomFromLocationCommand
            {
                Capacity   = request.Capacity,
                IsEnabled  = request.IsEnabled,
                Name       = request.Name,
                LocationId = locationId
            };

            var vm = await mediator.Send(itemCommand);

            if (vm.Id != null)
            {
                var link = Url.Link("GetLocationItem", new { classroomId = vm.Id, locationId });
                return(Created(link, vm));
            }
            else
            {
                return(BadRequest(vm));
            }
        }