public async Task Delete(Guid id) { var oldLink = linkReader.GetDto(id); if (oldLink == null) { await Clients.Client(this.Context.ConnectionId).SendAsync("Error", "Context не найден в базе"); } try { linkWriter.Delete(id); } catch (Exception e) { Console.WriteLine(e); throw; } await SendMessageToAllClients(); }
public IActionResult Delete(Guid id) { linkWriter.Delete(id); return(Ok()); }