asp.net-web-api-odata Questions

5

Solved

I am using OData Web API for Version 4, when I try to query OData web Api using $top parameter, it return me following exception message. The query specified in the URI is not valid. The limit o...
Sung asked 21/9, 2016 at 17:8

12

Solved

I have a fairly large data model that I want to expose using Web API OData using the OData V4 protocol. The underlying data is stored in a SQL Server 2012 database. That database has many DateTime...
Vendible asked 7/8, 2014 at 18:27

2

Web API OData v7. I'm writing a custom formatter for CSV, Excel, etc. I have a disconnect of how I point my custom formatter (ODataMediaTypeFormatter) to my custom classes where I modify the output...
Darrickdarrill asked 10/1, 2019 at 21:33

3

What's the difference between [EnableQuery(PageSize=20)] and [EnableQuery(MaxTop=20)]? As far as I can tell they both set a max limit on the result. Calling GET odata/Products?$top=100 on either ...
Restive asked 20/3, 2015 at 11:27

6

I'm trying to create a new ASP.NET Core project with a "simple" web api using OData and EntityFramework. I have previously used OData with older versions of ASP.NET. I have set up a controller wit...

7

Solved

Background: I have a very large OData model that is currently using WCF Data Services (OData) to expose it. However, Microsoft has stated that WCF Data Services is dead and that Web API OData is th...
Luralurch asked 27/7, 2014 at 14:11

2

Solved

I want to get a list of distinct values from my OData endpoint. But distinct or group by isn't supported yet. My URI query looks something like this GET /odata/Products?$select=foo & $top=10 ...
Toxinantitoxin asked 8/5, 2015 at 10:30

1

I have some entities which have data that must only be accessible for some users. public class Foo { public virtual Bar { get; set; } ... } public class Bar { public string Secret { get; set;...
Sassanid asked 1/10, 2015 at 14:58

2

Solved

I'm using WebAPI 2.2 with OData V4. It is possible for me to use $filter=RelatedObj/PropertyName eq 'Some Value' to filter a list of entities based on a related object property value. However, wh...
Licketysplit asked 16/6, 2015 at 13:13

2

Solved

So, using the ODataController, you get to control what gets returned if somebody does /odata/Foos(42)/Bars, because you'll be called on the FoosController like so: public IQueryable<Bar> Get...
Kerguelen asked 29/9, 2015 at 13:25

1

Solved

I'm having a really hard time migrating from WCF data service to web api odata v4. I'm stuck on the following issue: odata web api doesn't seem to support @odata.bind. I've found the following l...
Malicious asked 16/6, 2015 at 15:30

1

Solved

I'm building an OWIN self-hosted Web API 2 service. I need for this service to expose OData end points. The traditional IIS-hosted method involves App_Start/WebApiConfig.cs: using ProductService....

2

Solved

I am building out my new v4 service and all was going well until I added a new controller for a new model/entity and got this error when starting the site up for a test run. The controller seems t...
Knp asked 7/1, 2015 at 17:10

1

I'm trying to create a custom function in an OData v4 Web API solution. I need to return a collection of "Orders" based on unique logic that can't be handled natively by OData. I cannot seem to fig...
Sized asked 12/8, 2014 at 15:24

2

Solved

I am trying to get a Web API OData V4 endpoint up and running. I got it going finally (after removing all the DateTime properties from my endpoint) and now the listing of the entities is in JSON. ...
Heliotrope asked 8/8, 2014 at 19:11

2

Solved

I am getting the following error: The path template 'GetClients()' on the action 'GetClients' in controller 'Clients' is not a valid OData path template. Resource not found for the segment 'GetC...

3

We are currently investigating the use of OData query syntax in our Web APIs. We are not looking to implement a full OData implementation - merely leverage the query syntax. It is generally consid...

3

Solved

Trying to find single record using primary key CourseID against odata web.api using this: var editedcourse = container.Courses.Where(c => c.CourseID == ID).SingleOrDefault(); This is error: ...

0

I am trying to send a large $filter string to my webapi odata endpoint.But it gives me error saying the size of request headers are too long/maxurlstringlength exceeds. Is there a way to send the ...
Tympany asked 25/11, 2013 at 8:28

1

Solved

Using OData, how can I make this filter? My class: public class Aviso { public int Id { get; set; } public virtual ICollection<User> Destinatarios { get; set; } public string Url { get;...
Lasonde asked 20/9, 2013 at 13:32

4

Solved

I have an ASP.NET Web API project. I'm trying to pass some query options to my API controller like so: http://localhost:61736/api/Enquiries? callback=callback&$top=30&$skip=30&orderby=...
Diminutive asked 28/8, 2012 at 14:45
1

© 2022 - 2024 — McMap. All rights reserved.