Id、UserId、Price、PaymentDate を持つ UserPaymentHistory というエンティティがあります。最後の PaymentDate を持つユーザーを持つ行を取得する必要があります。
次のようなクエリを実行できます。
var lastPaymentDate =
db.Repository<UserPayment>()
.Where(u => u.UserId == 1)
.Select(x => x.PaymentDate)
.Max();
その後:
var userPayment = db.Repository<UserPayment>()
.Where(u => u.UserId == request.UserId
&& u.PaymentDate == lastPaymentDate).Single();
1 回のクエリでそのレコードを取得する方法はありますか? :)