I am trying to insert if statement within Where in a model,
q = from vw_masterview in ctx.vw_MasterViews
where
vw_masterview.LastDate <= toDate &&
vw_masterview.OfficeId == MemberRepository.AllowedOfficeId
AllowedOfficeId could be null, I would like to add if statment
q = from vw_masterview in ctx.vw_MasterViews
where
vw_masterview.LastDate <= toDate &&
***if (MemberRepository.AllowedOfficeId != null)***
vw_masterview.OfficeId == MemberRepository.AllowedOfficeId
Thanks in advance.