// GET: Editoriales/Details/5 public async Task <IActionResult> Details(int?id) { if (id == null) { return(NotFound()); } var editorial = await _client.GetById(id.Value); if (editorial == null) { return(NotFound()); } return(View(editorial)); }
public async Task <Editoriales> SaveEditorial(Editoriales editorial) { _logger.LogDebug("Editoriales client created, request = GetById{@id}", editorial.Id); var _editorial = await _editoriales.GetById(editorial.Id); _logger.LogDebug("Editoriales response {@response}", _editorial); if (_editorial is null) { _logger.LogDebug("Editoriales client created, request = Create{@editorial}", editorial); _editorial = await _editoriales.Create(editorial); _logger.LogDebug("Editoriales response {@response}", _editorial); } else { _logger.LogDebug("Editoriales client created, request = Update{@editorial}", editorial); _editorial = await _editoriales.Update(editorial); _logger.LogDebug("Editoriales response {@response}", _editorial); } return(_editorial); }