示例#1
0
        // GET api/<controller>

        //UtilsService<ITS_DocumentType> Utils = new UtilsService<ITS_DocumentType>();
        // GET api/<controller>
        public IHttpActionResult Get()
        {
            try
            {
                var doctypes = Service.GetAll().OrderBy(e => e.DocumentType).ToList();
                if (doctypes.Count != 0)
                {
                    return(Ok(doctypes));
                }
                return(ResponseMessage(new ResponseMessageService(HttpStatusCode.NotFound, "No document types found.", Request.RequestUri.AbsoluteUri)));
            }
            catch (Exception e)
            {
                return(ExceptionMSG(e));
            }
        }