Esempio n. 1
0
        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();
        }
Esempio n. 2
0
 public IActionResult Delete(Guid id)
 {
     linkWriter.Delete(id);
     return(Ok());
 }