Exemplo n.º 1
0
        public IActionResult Get()
        {
            var queryCollection = this.Request.Query;

            if (queryCollection.Count() == 0)
            {
                var specsInfos = _service.GetAll() as IEnumerable <object>;

                if (specsInfos == null || specsInfos.Count() <= 0)
                {
                    return(NotFound());
                }

                return(Ok(specsInfos));
            }
            else if (queryCollection.Count() == 1)
            {
                return(GetQueries(queryCollection));
            }
            else
            {
                return(NotFound());
            }
        }