public async Task CreateAsync() { // Arrange var input = new OrganizationCreateDto { Name = "c37124702fc14b5293bae3a020d051b8078807b857174ed1b2", Number = "1ccb4c5444bd48a78f7f903dd56b0f3bcf3751962c004759aa", Street = "8935e6ce84c84b9b89cfa29ea6193f315200ff99556d4efda0bb58b3a0d6d5cbeb71ba5d4a154b37ad1ce29628f2dc7c610a", City = "d1ac7920943247f0aa5570927598bc86a141de58745e4500b1", State = "ea752b0dc1694c23bde29d648f8881078308da1d21ae4885bb", Zipcode = "2bcafc4f66d14bb", Phone = "6593a25345e6400", Fax = "8cd71e5187e648c", Notes = "3240808e7b754ac3a015e345242b1a093e952aae84094f4d8df14f66c11f87c23ccb05a58b6545cca855e6446a95340df296feb026b44d589a0a2ce4dd3c22e679c659d60e5b4173ba2425296bc74118829a9dd6c6d14ef5bdcf8c4b7333aff73c1e4369620f4e76816d9b92a2bb9f7479914ab2ec5147f69cbd92f6ef47e66603ff1aa4eed747d7bee78a4f60cdca41d1cf85b111b0472390938167b951c83a64d7ca538fcd47b990f21754ef6111ae85ee4ff63a3242c0a8476967644d8abdf24f4c4449df44c8837cb3fecf7fbf6735703ab8b5e2417a832a3e34d84213be5ebc0413abd84bddb3a78787bea4a7b6bb97a00124984183bb153f4579b507b2fdafa5c2f1414511b3b8a2070e4de1d3faba53d1e6994951a60322123bd0170a4b0b7c06677048a4b4ebce92fe7ffc257e299e621abd40d3aff013bca07ee93c6f25da85d1354535a1a781d4258864136646a76d8637469889c37f37302a2a9e737518dc15414c549fcc97e96e7507a4038635fbed41462a9550ba2874a17533483f97370bf243f786a9453f2a1f18c6e088e9bb3e754059aa82be440336dab1c615f5b21d074053a6086f8849998803ff8c366b2fc141e9b295b4cb3774f508f3900f0d929841318c4f258befaeaee2dcc8adcf6e1143b7afdf8469e1ce39c923809aa2817f41a7ba3f94c7706a0030ddaf9aaba1ea4990a62b90c071d28f15" }; // Act var serviceResult = await _organizationAppService.CreateAsync(input); // Assert var result = await _organizationRepository.FindAsync(c => c.Id == serviceResult.Id); result.ShouldNotBe(null); result.Name.ShouldBe("c37124702fc14b5293bae3a020d051b8078807b857174ed1b2"); result.Number.ShouldBe("1ccb4c5444bd48a78f7f903dd56b0f3bcf3751962c004759aa"); result.Street.ShouldBe("8935e6ce84c84b9b89cfa29ea6193f315200ff99556d4efda0bb58b3a0d6d5cbeb71ba5d4a154b37ad1ce29628f2dc7c610a"); result.City.ShouldBe("d1ac7920943247f0aa5570927598bc86a141de58745e4500b1"); result.State.ShouldBe("ea752b0dc1694c23bde29d648f8881078308da1d21ae4885bb"); result.Zipcode.ShouldBe("2bcafc4f66d14bb"); result.Phone.ShouldBe("6593a25345e6400"); result.Fax.ShouldBe("8cd71e5187e648c"); result.Notes.ShouldBe("3240808e7b754ac3a015e345242b1a093e952aae84094f4d8df14f66c11f87c23ccb05a58b6545cca855e6446a95340df296feb026b44d589a0a2ce4dd3c22e679c659d60e5b4173ba2425296bc74118829a9dd6c6d14ef5bdcf8c4b7333aff73c1e4369620f4e76816d9b92a2bb9f7479914ab2ec5147f69cbd92f6ef47e66603ff1aa4eed747d7bee78a4f60cdca41d1cf85b111b0472390938167b951c83a64d7ca538fcd47b990f21754ef6111ae85ee4ff63a3242c0a8476967644d8abdf24f4c4449df44c8837cb3fecf7fbf6735703ab8b5e2417a832a3e34d84213be5ebc0413abd84bddb3a78787bea4a7b6bb97a00124984183bb153f4579b507b2fdafa5c2f1414511b3b8a2070e4de1d3faba53d1e6994951a60322123bd0170a4b0b7c06677048a4b4ebce92fe7ffc257e299e621abd40d3aff013bca07ee93c6f25da85d1354535a1a781d4258864136646a76d8637469889c37f37302a2a9e737518dc15414c549fcc97e96e7507a4038635fbed41462a9550ba2874a17533483f97370bf243f786a9453f2a1f18c6e088e9bb3e754059aa82be440336dab1c615f5b21d074053a6086f8849998803ff8c366b2fc141e9b295b4cb3774f508f3900f0d929841318c4f258befaeaee2dcc8adcf6e1143b7afdf8469e1ce39c923809aa2817f41a7ba3f94c7706a0030ddaf9aaba1ea4990a62b90c071d28f15"); }
/// <summary> /// 新增 /// </summary> /// <param name="input"></param> /// <returns></returns> public async Task <JsonResponse> Create(OrganizationRequestDto input) { input.InitCreateRequest(); var resJson = await _applicationEnginee.TryTransactionAsync(async() => { await _organizationAppService.CreateAsync(input); }); return(resJson); }
public Task <OrganizationDto> CreateAsync(CreateOrganizationDto input) { return(_orgAppSvc.CreateAsync(input)); }
public Task <OrganizationDto> CreateAsync(CreateUpdateAbpOrganizationDto input) { return(_abpOrganizationAppService.CreateAsync(input)); }
public async Task <IActionResult> OnPostAsync() { await _organizationAppService.CreateAsync(Organization); return(NoContent()); }