public void DeleteInternal(UserAccount userAccount,
                                   IQueryable <Subscription> subs)
        {
            var deletedIds = subs.Select(x => x.Id).ToArray();

            dataContext.Subscriptions.RemoveRange(subs);
            dataContext.SaveChanges();

            SubscriptionsDeleted?.Invoke(this, new SubscriptionsDeletedEventArgs()
            {
                User = userAccount, SubscriptionIds = deletedIds
            });
        }
示例#2
0
 private void NotifySubscriptionsDeleted(int[] ids)
 {
     SubscriptionsDeleted?.Invoke(this, ids);
 }