Как то так?:
var query = db.ClientProperties.GroupJoin(
db.Properties,
a => a.PROPREF,
b => b.PROPREF,
(a, b) => new { ClientProperties = a, Properties = b })
.SelectMany(x => x.ClientProperties.Where(y => y.Contract == "TXT" && string.IsNullOrEmpty(y.PROPREF.ToString())),
(a, b) => new { ClientProperties = a, Properties = b }).ToList();
Я полагаю, ваш объект "ClientProperties ()" является контекстом или чем-то в этом роде. В этом случае вам нужно сделать что-то вроде:
using (var db = new ClientProperties())
{
var query = db.ClientProperties.GroupJoin(
db.Properties,
a => a.PROPREF,
b => b.PROPREF,
(a, b) => new { ClientProperties = a, Properties = b })
.SelectMany(x => x.ClientProperties.Where(y => y.Contract == "TXT" && string.IsNullOrEmpty(y.PROPREF.ToString())),
(a, b) => new { ClientProperties = a, Properties = b }).ToList();
}
И тогда вы можете легко получить доступ к объекту:
var response = query.FirstOrDefault().ClientProperties.Propref;
foreach (var item in query)
{
var each_response = item.ClientProperties.Propref;
}