public void DeleteActor(int id) { var actor = actorRepository.GetById(id); if (actor != null) { castRepository.DeleteRange(c => c.ActorId == id); actorRepository.Delete(actor); } }
public void DeleteCastsByActorId(int actorId) { castRepository.DeleteRange(c => c.ActorId == actorId); }