private async void DeleteMemberships(Group toDelete) { var memberships = toDelete.Memberships; foreach (var mem in memberships) { _context.Memberships.Remove(mem); } _context.SaveChanges(); }
private void CleanMemberships(Group toUpdate) { var memberships = toUpdate.Memberships; foreach (var mem in memberships) { _context.Memberships.Remove(mem); } _context.SaveChanges(); }