public async Task <IActionResult> DeleteById(int id)
        {
            try
            {
                await _ownerService.Delete(id);

                _logger.LogInformation("Delete was successful.");
                return(RedirectToAction(nameof(Index)));
            }
            catch (Exception ex)
            {
                _logger.LogError("Delete failed.", ex);
                return(View());
            }
        }
Exemplo n.º 2
0
 public void A030_DeleteOwner()
 {
     ownersService.Delete(Owner4PrimaryKey);
 }