private static void SetActivation(User subscriber, Node target, bool value)
{
using (var context = new DataHandler())
{
var subscription = context.Subscriptions.Where(x =>
x.UserPath == subscriber.Path &&
x.ContentPath == target.Path &&
x.Active == (byte)(value ? 0 : 1)).FirstOrDefault();
if (subscription == null)
return;
subscription.IsActive = value;
context.SubmitChanges();
}
}