Exemple #1
0
        public async Task <IActionResult> Delete(int Id)
        {
            if (Id == 0)
            {
                return(BadRequest());
            }

            try
            {
                var response = await clientesRepository.Delete(Id);

                if (response == 0)
                {
                    return(NotFound());
                }
                var result = new
                {
                    code = 20000,
                    data = "success"
                };
                return(Ok(result));
            }
            catch (Exception ex)
            {
                return(BadRequest());
            }
        }
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            //Clientes clientes = await repositorio.GetById(id);
            await repositorio.Delete(id);

            await repositorio.Save();

            return(RedirectToAction("Index"));
        }
Exemple #3
0
 public void Delete(ClientesDTO client)
 {
     _repository.Delete(client);
 }
 public Clientes Delete(long id)
 {
     return(clientesRepository.Delete(id));
 }
 public IActionResult Delete(int id)
 {
     _repository.Delete(id);
     return(RedirectToAction("index"));
 }
 public int Delete(int id)
 {
     BeginTransaction();
     _rep.Delete(id);
     return(Commit());
 }
 public Clientes Delete(Clientes entity)
 {
     return(_clientesRepository.Delete(entity));
 }
 public IHttpActionResult Delete(decimal cpf)
 {
     _ClientesRepository.Delete(cpf);
     return(Ok());
 }