Esempio n. 1
0
        public ActionResult <DetailModel <LanguageModel> > Detail(Guid id)
        {
            try
            {
                return(Ok(_serviceLanguage.Detail(id)));
            }

            catch (NotFoundException)
            {
                ModelState.AddModelError("ErrorMessage", Messages.DangerRecordNotFound);
                return(BadRequest(ModelState));
            }

            catch (Exception exception)
            {
                ModelState.AddModelError("ErrorMessage", Messages.DangerRecordNotFound + " " + exception);
                return(BadRequest(ModelState));
            }
        }