private Organization ToOrganization(OrganizationElement organization) { if (organization == null) { return(null); } return(new Organization { DisplayName = organization.DisplayName, Name = organization.Name, Url = organization.Url }); }
private Organization ToOrganization(OrganizationElement organization) { if (organization == null) return null; return new Organization { DisplayName = organization.DisplayName, Name = organization.Name, Url = organization.Url }; }
/// <summary> ///异步验证 /// </summary> public static async Task DoValidationAsync(IOrganizationElementRespository organizationElementRespository, OrganizationElement organizationElement, string validatorType) { var organizationElementValidator = new OrganizationElementValidator(organizationElementRespository); var validatorReresult = await organizationElementValidator.DoValidateAsync(organizationElement, validatorType); if (!validatorReresult.IsValid) { throw new DomainException(validatorReresult); } }