You need to to check if record in
emplyeesalaries table month is smaller than previous month which can be checked like:
int currentMonth = Datetime.Now.Month;
int previousMonth = Datetime.Now.AddMonths(-1).Month;
IQueryable<employee> emp = (from x in db.GetTable<employee>()
join y in db.employesalaries
on new {x.Id,currentMonth}
equals new {y.employe_id,y.paymentdate.Month} into ps
from salary in ps.DefaultIfEmpty();
where salary ==null
&& x.branch_id == branchId
select x);