Home

LinqPad error when access OData using WebApi

Hi, i'm trying to access OData service which created using WebApi like below:

// GET api/transactions
[Queryable]
public IEnumerable Get()
{
return transactionsList;
}

when i add connection on LinqPad, it give me Error: Data at the root level is invalid.
but if i try query the OData WebApi using browser, it work ok.

http://localhost/api/transactions
http://localhost/api/transactions?$filter=some_filter

how to fix this? can you help?
i use LinqPad v4.44.05 Premium Edition.

thanks,
heri

Comments

  • LINQPad doesn't have a REST driver - you have to query the source like you would in Visual Studio, using HttpClient or WebClient. I'm not sure whether it would even be possible to write such a driver, because there's no standard for discovery AFAIK.
Sign In or Register to comment.