Please help i am trying to return values from stored procedure but getting error
Error below
Severity Code Description Project File Line Suppression State
Error BC30311 Value of type '<anonymous type: account As Object, Name As Object, Stream As Object, Category As Object, Classt As Object, Froms As Object, Tos As Object>' cannot be converted to 'HandlerVBRegistrationController.Customerd'. KABOJJAAPPAPI
Imports System.Data.SqlClient
Imports System.Net
Imports System.Web.Http
Namespace Controllers
Public Class RegistrationsampleController
Inherits ApiController
<Route("api/Registrationsample/Registrationdata/{ne}/{cy}")>
<HttpGet>
Function Registrationdata(ByVal ne As String, ByVal cy As String) As IHttpActionResult
Dim customers As New List(Of Customerd)()
Dim constr As String = ConfigurationManager.ConnectionStrings("KABOJJAConnectionString").ConnectionString
Using con As New SqlConnection(constr)
Using cmd As New SqlCommand()
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "Registeredandroidrecord"
cmd.Parameters.AddWithValue("@CustomerId", ne)
cmd.Parameters.AddWithValue("@sx", cy)
cmd.Connection = con
con.Open()
Using sdr As SqlDataReader = cmd.ExecuteReader()
While sdr.Read()
customers.Add(New With {
.account = sdr("Account"),
.Name = sdr("Names"),
.Stream = sdr("Stream"),
.Category = sdr("Category"),
.Classt = sdr("Class"),
.Froms = sdr("Froms"),
.Tos = sdr("Tos")
})
End While
End Using
con.Close()
End Using
Return Ok(customers)
End Using
If IsNothing(customers) Then
Return NotFound()
Else
Return Ok(customers)
End If
'Return customers
End Function
Public Class Customerd
Public Property Account() As String
Public Property Name() As String
Public Property Stream() As String
Public Property Category() As String
Public Property Classt() As String
Public Property Tos() As String
Public Property Froms() As String
End Class
End Class
'End Class
End Namespace