Ejemplo n.º 1
0
        public async Task <ActionResult> Delete(int id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            var robot = await _robotService.ScrapRobot(id);

            await _notificationHub.Clients.All.SendAsync("Notify", new Notification($"{robot.Name} deactivated!", SeverityLevel.Info));

            return(Ok());
        }