I have table with token, userName, StatusId. Before i insert any row in table for a specific user i would like to check if any rows with active status are there if so update it to inactive.
I am unable to figure out how can i do this in LINQ. Currently iam retreving my values as the query below.
var activeUsers =
(from _users in currentDataContext.Users
where _users.StatusId.Equals(1)
select _session);