Esempio n. 1
0
 public async Task <bool> DeleteAsync(int id)
 {
     using (IDbConnection connection = _customersRepository.Connection)
     {
         return(await _customersRepository.DeleteAsync(id));
     }
 }
        public async Task <ActionResult> Delete(string Id)
        {
            var deleteResult = await _customersRepository.DeleteAsync(Id);

            var model = await _customersRepository.GetAllAsync();

            model.Message = deleteResult.Message;
            model.Success = deleteResult.Success;
            return(View(nameof(this.Index), model));
        }
 public async Task <bool> DeleteAsync(string customerId)
 {
     return(await _customersRepository.DeleteAsync(customerId));
 }