/// <summary>
 /// 转换为部门业务区域实体
 /// </summary>
 /// <param name="dto">部门业务区域数据传输对象</param>
 public static OrganizationsRegion ToEntity(this OrganizationsRegionDto dto)
 {
     if (dto == null)
     {
         return(new OrganizationsRegion());
     }
     return(dto.MapTo(new OrganizationsRegion(dto.Id.ToGuid())));
 }
 /// <summary>
 /// 转换为部门业务区域实体
 /// </summary>
 /// <param name="dto">部门业务区域数据传输对象</param>
 public static OrganizationsRegion ToEntity3(this OrganizationsRegionDto dto)
 {
     if (dto == null)
     {
         return(new OrganizationsRegion());
     }
     return(OrganizationsRegionFactory.Create(
                deptRegionId: dto.Id.ToGuid(),
                organizationsId: dto.OrganizationsId,
                addressId: dto.AddressId,
                addressDetail: dto.AddressDetail,
                addressName: dto.AddressName,
                version: dto.Version
                ));
 }
 /// <summary>
 /// 转换为部门业务区域实体
 /// </summary>
 /// <param name="dto">部门业务区域数据传输对象</param>
 public static OrganizationsRegion ToEntity2(this OrganizationsRegionDto dto)
 {
     if (dto == null)
     {
         return(new OrganizationsRegion());
     }
     return(new OrganizationsRegion(dto.Id.ToGuid())
     {
         OrganizationsId = dto.OrganizationsId,
         AddressId = dto.AddressId,
         AddressDetail = dto.AddressDetail,
         AddressName = dto.AddressName,
         Version = dto.Version,
     });
 }