I have two tables which are customers and payments.
Table Customers ==> Columns [CustomerId, ...other customer info].
Table Payments ==> Columns [PaymentId, CustomerId, Year, ...other payment info]
How can I get customers that haven't paid this year. I have no idea what I need.
import System.Linq;
var result = from customers in context.Customers
join payments from context.Payments
on customers.CustomerId equals payments.CustomerId
where payments.Year == 2021 into paymentsCount
where paymentsCount.count == 0;