public async void CreateLecturer(CreateLecturerDto createLecturerDto) { var connectionString = _configuration.GetConnectionString("CosmosDB"); var client = new CosmosClientBuilder(connectionString) .WithSerializerOptions(new CosmosSerializationOptions { PropertyNamingPolicy = CosmosPropertyNamingPolicy.CamelCase }) .Build(); var createLecturerContainer = client.GetContainer("TestDatabase", "Lecturer"); var lecturer = new CreateLecturerDto { Name = createLecturerDto.Name }; await createLecturerContainer.CreateItemAsync(lecturer); }
public void CreateLecturer(CreateLecturerDto createLecturerDto) { _lecturerRepository.CreateLecturer(createLecturerDto); }