|
@@ -108,7 +108,7 @@ public class SnapshotUserApplication : ISnapshotUserApplication, IScopeDependenc
|
|
|
.LeftJoin<ThirdAccount>((citizen, third) => citizen.Id == third.ExternalId)
|
|
|
.LeftJoin<CitizenRelationSafetyType>((citizen, third, relation) => relation.CitizenId == citizen.Id)
|
|
|
.WhereIF(dto.PhoneNumber.NotNullOrEmpty(), (citizen, third) => citizen.PhoneNumber.Contains(dto.PhoneNumber))
|
|
|
- .WhereIF(dto.SafteyTypeId.NotNullOrEmpty(), (citizen, third, relation) => relation.SafetyTypeId == dto.SafteyTypeId && relation.CitizenId == null)
|
|
|
+ .WhereIF(dto.SafetyTypeId.NotNullOrEmpty(), (citizen, third, relation) => relation.SafetyTypeId == dto.SafetyTypeId && relation.CitizenId == null)
|
|
|
.Select((citizen, third, relation) => new GetThirdCitizenOutDto { CitizenId = citizen.Id}, true);
|
|
|
#if DEBUG
|
|
|
var sql = query.ToSqlString();
|