Esempio n. 1
0
 public async Task DeleteValidation(DeleteIn pRequest)
 {
     if (!await _repository.GetAll().AnyAsync(a => a.Id == pRequest.Id))
     {
         throw new AbpValidationException("Unexisting entity");
     }
 }
Esempio n. 2
0
        public async Task PreTreatment_Delete(DeleteIn pRequest)//async
        {
            List <TestPreTreatment> list = await this._repository.GetAll().Where(w => w.TestId == pRequest.Id).ToListAsync();

            foreach (TestPreTreatment testPreTreatment in list)
            {
                await this._repository.DeleteAsync(testPreTreatment);
            }
        }
Esempio n. 3
0
 public virtual async Task Delete(DeleteIn pRequest)
 {
     await this._repository.DeleteAsync(w => w.Id == pRequest.Id);
 }