Skip to main content
Question Protected by Pavneet_Singh
added 3 characters in body
Source Link
DavidRR
  • 19.8k
  • 27
  • 114
  • 202

I have an ASP.NET Web API (version 4) REST service where I need to pass an array of integers.

Here is my action method:

public IEnumerable<Category> GetCategories(int[] categoryIds){ // code to retrieve categories from database } 

And this is the URL that I have tried:

/Categories?categoryids=1,2,3,4 

I have ASP.NET Web API (version 4) REST service where I need to pass an array of integers.

Here is my action method:

public IEnumerable<Category> GetCategories(int[] categoryIds){ // code to retrieve categories from database } 

And this is the URL that I have tried:

/Categories?categoryids=1,2,3,4 

I have an ASP.NET Web API (version 4) REST service where I need to pass an array of integers.

Here is my action method:

public IEnumerable<Category> GetCategories(int[] categoryIds){ // code to retrieve categories from database } 

And this is the URL that I have tried:

/Categories?categoryids=1,2,3,4 
Copy-edited title and question and added the 'rest' tag.
Source Link
DavidRR
  • 19.8k
  • 27
  • 114
  • 202

How to pass Pass an array of integers to ASP.NET Web API?

I have aspASP.net web api restNET Web API (version 4) REST service where I need to pass an array of integers. How can this be done in asp.net 4 web api.

Here is my action method:

public IEnumerable<Category> GetCategories(int[] categoryIds){ // code to retrieve categories from database } 

Url to accessAnd this is the above serviceURL that I have tried:

/Categories?categoryids=1,2,3,4 
/Categories?categoryids=1,2,3,4 

How to pass an array of integers to ASP.NET Web API?

I have asp.net web api rest service where I need to pass an array of integers. How can this be done in asp.net 4 web api.

public IEnumerable<Category> GetCategories(int[] categoryIds){ // code to retrieve categories from database } 

Url to access the above service

/Categories?categoryids=1,2,3,4 

Pass an array of integers to ASP.NET Web API?

I have ASP.NET Web API (version 4) REST service where I need to pass an array of integers.

Here is my action method:

public IEnumerable<Category> GetCategories(int[] categoryIds){ // code to retrieve categories from database } 

And this is the URL that I have tried:

/Categories?categoryids=1,2,3,4 
edited tags; edited title
Link
abatishchev
  • 100.7k
  • 88
  • 303
  • 443

How to pass an array of integers to a aspASP.net web api rest serviceNET Web API?

edited tags
Link
Mrchief
  • 76.4k
  • 20
  • 145
  • 193
Loading
edited title
Link
Steve Czetty
  • 6.2k
  • 9
  • 41
  • 49
Loading
edited tags
Link
Loading
Source Link
Hemanshu Bhojak
  • 17.3k
  • 19
  • 51
  • 64
Loading