public async Task <ActionResult> Delete(int id) { _logger.LogWarning("Se va a borrar un cliente"); await _customersService.Delete(id); return(Ok()); }
public async Task <ActionResult <Customer> > Delete(int id) { var request = new CustomerDeleteRequest { Id = id }; return(await _customersService.Delete(request).Convert <Customer>(this)); }
public IActionResult Delete(Customers customers) { var result = _customersService.Delete(customers); if (result.Success) { return(Ok(result)); } return(BadRequest(result)); }
public ActionResult Delete(string username) { try { _customersService.Delete(_ => _.Username == username); _customersService.SaveChanges(); return(StatusCode(204)); } catch (Exception e) { return(BadRequest(e.Message)); } }
public void Delete(int id) { _customerService.Delete(id); }
public ActionResult Delete(long id) { Action process = () => { service.Delete(id); }; return ExecuteProcess(process); }
public async Task <OperationResult> Delete(int id) { return(await _customersService.Delete(id)); }