Ejemplo n.º 1
0
        public IActionResult AddMenu([FromBody] Menu request)
        {
            var response = new OperationResponse <bool>();

            try
            {
                response.Data = _lookupService.AddMenu(request);
            }
            catch (Exception exception)
            {
                response.State = ResponseState.Error;
                response.Messages.Add(exception.Message);
                _logger.LogError(exception, "Error in AddMenu ==>" + exception.StackTrace, request);
            }
            return(new JsonResult(response));
        }