Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

VS 2019 parameter in api controller ...

giminera73

New member
Joined
Dec 2, 2019
Messages
1
this is my code in parameter of table Porto (fields are CodPorto and Des)

Namespace Controllers
Public Class PortoController
Inherits System.Web.Http.ApiController

Private db As New ES42Entities

' GET: api/Porto
Function GetPortoes() As IQueryable(Of Porto)
Return db.Porto
End Function

I don't know how to add parameters to search with url like this:
http://localhost/abc/api/Porto?CodPorto=1

I thanks in advance everyone that could help me.
bye
George
 
Joined
May 20, 2005
Messages
104,556
Please don't post unformatted code snippets. They are hard to read.
[highlight=vb]Namespace Controllers
Public Class PortoController
Inherits System.Web.Http.ApiController

Private db As New ES42Entities

' GET: api/Porto
Function GetPortoes() As IQueryable(Of Porto)
Return db.Porto
End Function[/highlight]
 

Nizeed

Banned
Joined
Dec 30, 2019
Messages
9
Top