Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Viewing all articles
Browse latest Browse all 1698

web api passing value

$
0
0

hello all,

below are my 2 different methods in my controller, when im calling like http://localhost:81/api/GettlkpCountries?id=1 then its displaying data but, if i call like http://localhost:81/api/GettlkpCountries/1 then im getting exceptions as "No HTTP resource was found that matches the request URI 'http://localhost:81/api/GettlkpCountries/1". May i know what is the issue?

// GET: api/LookUpCountries
        [Route("api/GettlkpCountries")]
        public IQueryable<tlkpCountry> GettlkpCountries()

// GET: api/LookUpCountries
        [Route("api/GettlkpCountries")]
        public IQueryable<tlkpCountry> GettlkpCountries()


Viewing all articles
Browse latest Browse all 1698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>