public void CleanUpTest() { _personalRepository.GetAll().ToList().ForEach(x => { if (x.Nume.CompareTo("TEST") == 0) { _personalRepository.Delete(x.Id); } }); }
public async Task <IActionResult> Delete(long id) { var personal = await personalRepo.WithId(id); await personalRepo.Delete(personal); return(new OkObjectResult(personal)); }
public bool DeletePersonal(int _idPersonal) { bool respuesta = false; Expression <Func <tblPersonal, bool> > predicate = p => p.idPersonal == _idPersonal; personalRepository.Delete(predicate); respuesta = true; return(respuesta); }