I'm trying to do something like this:
SELECT UserID from Users as user
INNER JOIN UserStatus as userStatus on u.UserID = us.UserID
WHERE
--user.IsActive = 1
--if user.IsActive = 0
--userStatus.DeactivatedDate > @StartDate
--userStatus.DeactivatedDate < @EndDate
So in general I want a query that gets me all results whose value matches the where statement without necessarily ignoring all of those results that do not. Kind of like a Venn diagram with the the left side of the circle and the middle filled in. For the example I've shown, I want all users who are currently active and the users who are not active but were active within the given time frame (if I wanted the total number of users active at any point within a month, for instance).
I've tried doing things like
SELECT UserID from Users as user
INNER JOIN UserStatus as userStatus on u.UserID = us.UserID
WHERE
Case user.IsActive = 1
But that is obviously incorrect syntax. I will also need to translate this to LINQ as well, so resources on that would be beneficial as well.