public void CleanUpTest()
 {
     _personalRepository.GetAll().ToList().ForEach(x =>
     {
         if (x.Nume.CompareTo("TEST") == 0)
         {
             _personalRepository.Delete(x.Id);
         }
     });
 }
Esempio n. 2
0
        public async Task <IActionResult> Delete(long id)
        {
            var personal = await personalRepo.WithId(id);

            await personalRepo.Delete(personal);

            return(new OkObjectResult(personal));
        }
Esempio n. 3
0
        public bool DeletePersonal(int _idPersonal)
        {
            bool respuesta = false;

            Expression <Func <tblPersonal, bool> > predicate = p => p.idPersonal == _idPersonal;

            personalRepository.Delete(predicate);
            respuesta = true;

            return(respuesta);
        }