public async Task Should_Be_Able_To_Create_A_District() { var districtCreateDto = new DistrictCreateDto { Id = "Colombo Fun", ProvinceID = "Western" }; var districtDto = await DistrictAppService.CreateAsync(districtCreateDto); districtDto.ShouldNotBeNull(); districtDto.Id.ShouldNotBeNullOrEmpty(); districtDto.Id.ShouldNotBeNullOrWhiteSpace(); districtDto.Id.ShouldBe(districtCreateDto.Id); districtDto.ProvinceID.ShouldBe(districtCreateDto.ProvinceID); }
public async Task <DistrictDto> Create([FromBody] DistrictCreateDto dto) { return(await DistrictAppService.CreateAsync(dto)); }