示例#1
0
        private async void DeleteMemberships(Group toDelete)
        {
            var memberships = toDelete.Memberships;

            foreach (var mem in memberships)
            {
                _context.Memberships.Remove(mem);
            }
            _context.SaveChanges();
        }
示例#2
0
        private void CleanMemberships(Group toUpdate)
        {
            var memberships = toUpdate.Memberships;

            foreach (var mem in memberships)
            {
                _context.Memberships.Remove(mem);
            }

            _context.SaveChanges();
        }