Ejemplo n.º 1
0
        public async Task <IActionResult> DeleteFactory(int factoryId)
        {
            var saveResult = await _factoryService.DeleteFactory(factoryId);

            if (saveResult)
            {
                await _hubContext.Clients.All.SendAsync("ListChanged", factoryId);
            }

            return(StatusCode(200, saveResult));
        }
        public async Task <IActionResult> DeleteFactory(int id)
        {
            try
            {
                await _service.DeleteFactory(id);

                return(StatusCode(204));
            }
            catch
            {
                return(StatusCode(404));
            }
        }