0
votes
1answer
11 views

How to sort IQueryable<string> using odata?

I have a web api that returns IQueryable i want to sort the list of string in asc order My MyAPIController code [Queryable] public IQueryable<string> Get() { //result ...
0
votes
2answers
71 views

How do I add a OData key value to my Entity Framework class?

I am using MVC 5, Microsoft OData 2.1, and Entity Framework 6. I am trying to consume an OData feed that I wrote using the EntitySetController class. when I add the service reference and it consumes ...
0
votes
1answer
39 views

Invoke Put Odata Controller Method through Code in C#

I have a Odata controller class in my project, and I need to invoke PUT controller method from other piece of code. My PUT controller method's declaration looks like this, which accepts two ...
-1
votes
0answers
27 views

How to create self-creating documentation for odata?

I realized I need to use oData instead of webapi 2 for my project. But now I need a feature that generates documentation for my endpoints, like MVC does for your API's. Is there a way to generate ...
0
votes
1answer
23 views

Internal Server Error(500) when adding a record to a table using Odata and Knockout Js in Asp.Net MVC

I am trying to add a record to an SQL table using Knockout Js and OData using the following script. Knockout Js self.Grade = ko.observable(); self.selectedProduct = ko.observable(); self.add = ...
0
votes
1answer
46 views

What are the differences between MVC controllers (can I inject all controllers in one controller)?

What are the defferent between Controller(MVC) vs ApiController and BreezeController and IHttpController and ODataController? Why So many controllers in MVC? Which one is a main ...
1
vote
1answer
26 views

Returning ordered collection from EntitySetController Get

I am trying to order a collection before returning it from my Get method in my EntitySetController, here is my code : [Queryable] public IQueryable<Standing> GetStandings() { ...
1
vote
1answer
39 views

lamda for sort order - can a variable be used?

I have a C# MVC project. I want to build statement in client app controller method to fetch JSON from web.api, for paging/sort in the view template. Can the sort order be passed to this code as a ...
0
votes
1answer
58 views

Rendering first three elements of an Observable Array using Knockout JS using splice() not working

I am working on an Asp.Net MVC application in which I am using OData and Knockout JS View model to render the data on to the web page in a table. Now I just want only first three elements of my ...
0
votes
1answer
37 views

How do I generate an absolute OData URL for a given entity type?

I have a working OData implementation with routes setup in the typical way: var builder = new ODataConventionModelBuilder(); builder.EntitySet<Person>("People"); ...
0
votes
1answer
37 views

Should I use JayData in MVC 4 with WebApi and OData

My manager told me to do research on jaydata as dataservice for performing CRUD operations. I am exploring jaydata from last two weeks. My requirement is that I have WebApi Controllers at server ...
0
votes
2answers
66 views

HelpPage for Web Api using OData not working

I'm using the default MVC Help Page for a Web API that uses OData, it works great but if I inherit ODataController instead of ApiController then the Help Page doesn't generate. It shows blank. Only ...
0
votes
0answers
57 views

Updating a field in the database table to null not working using OData and Knockout Js in Asp.Net MVC 4

I am working on a web application in which I am using Knockout Js and OData to deal with the CRUD operations on the data. I have few drop downs from which I insert and update data to a database table. ...
0
votes
2answers
69 views

How to make a field in a table null instead of zero if the float text box is empty in asp.net mvc

I have developed an Asp.Net MVC 4 application in which I deal with few text boxes through which I enter the data into a sql table using knockout and OData. Now I have two text boxes which send float ...
0
votes
1answer
406 views

How to get AngularJS and KendoUI working in harmony?

In stages, I setup my .Net MVC solution and ensured both Angular JS and KendoUI are working independently. app.js: var app = angular.module("app", ['kendo.directives']); and in my controller, I ...
0
votes
1answer
151 views

How to get OData navigation properties

In my OData controller, I have methods like this : // GET odata/Fixtures(5) public SingleResult<Fixture> GetFixture([FromODataUri] int key) { return ...
0
votes
1answer
85 views

Why OData Web API returns JSON only

This is weird! I create OData Web API with ASP.NET MVC 5. Return IQueriable from the controller, nothing special. But in some reason it constantly returns JSON when I need XML. I send GET from ...
0
votes
2answers
153 views

MVC - Implementing OData without EF/DB but Application Service as data source

We have a WCF application service layer which acts as DataService for our domain models defined in DB. We are writing new REST web services that will work on top of existing application service. ...
1
vote
1answer
128 views

OData get object by field other than Id

I have just started working with Web Api OData and I find myself wanting to do something that I was able to do a standard ApiController, that is get an object from a field other than the Id field. I ...
0
votes
2answers
240 views

Odata receiving “The controller for path was not found or does not implement IController”

I'm kind of new on Odata and Web Api. I get this error from my get request in Fiddler: The controller for path '/odata/Unit' was not found or does not implement IController public class ...
0
votes
1answer
155 views

How do you create an action in MVC with oData

I have tried to follow the example code at https://aspnet.codeplex.com/sourcecontrol/latest#Samples/WebApi/ODataActionsSample/ODataActionsSample/NonBindableActionRoutingConvention.cs as well as I ...
1
vote
0answers
136 views

Unexpected result with $select statement using WebApi 2

I am working on a project using MVC 4 and WebApi 1 and it work well, After I upgraded it to MVC 5 and WebApi 2, everything works great, except this scenario: when i use the $select statement in the ...
1
vote
2answers
146 views

Change supported OData Protocol version when using MVC ODataController

I am using VS2013 with MVC and exposing a simple ODataController. In fact, I basically followed the tutorial here: ...
1
vote
0answers
93 views

OData DELETE request conflicts with ASP.NET MVC

I have an MVC4 web webapplication running on my server and I have a ADO.NET Data Service (OData) service in the same directory. Everything is working fine, my views can consume my OData service from ...
0
votes
2answers
40 views

Adding a Record with same Name but with different other fields with OData in Asp.Net MVC

I am working on an application where I am adding a record with fields like product, term, location, bid, offer etc into database table using text boxes in a table row. I am using OData and knockout Js ...
0
votes
1answer
102 views

Adding a service reference to a breeze odata service

Is it possible to consume an OData service (implemented using .Net MVC) with Breeze controllers? I tried adding a Service Reference from a client aplication, but it simply cannot find a service ...
0
votes
1answer
512 views

Asp.Net MVC4 Web API - Do we need OData for building a fast query service

We are building a query service for client which have the following requirements: Support Where, Begin, Contains, And, Or, Paging, Select. (1-main) Lookup/Mapping multiple values from one value ...
0
votes
1answer
187 views

ASP.net MVC oData route with parameters

Is it possible to use addresses like that : http://community.innovacall.local/odata/contactcompetencies(id=GetById/4a50412c-4e36-468a-b7d1-a36a78f02b02)?%24inlinecount=allpages&%24top=10 I ...
0
votes
0answers
126 views

Can Automapper Project().To<T> be customized on a per call basis?

I have a simple EF query, that needs to be passed back up to the client as IQueryable for an OData Web API controller. The query I make looks like this: var query = _context.Diary ...
1
vote
2answers
363 views

JSONP - WebApi EntitySetController

I have a web api project, and have added a JSONP formatter, and tested it works fine using the standard WebApi implementation. I also need to expose oData - however JSONP formatter seems to be ignored ...
0
votes
1answer
431 views

Advanced filter on Asp.net Wep Api OData

I have a asp.net wep api project with odata but I'm having some problems with odata filter mechanism. when I execute that query /api/values?$top=1&$filter=Comments/any(c: c/Id eq 64) it ...
1
vote
1answer
151 views

MVC4 OData serializes long to JSON strings

I am using the OData beta implementation included in .NET MVC4 and I'm experiencing a weird issue: all of long values are serialized into JSON strings, and not, like ints and floats, into regular ...
0
votes
1answer
370 views

ASP.NET Web API OData: Navigation Links when using Composite Keys

The OData questions keep coming :) I have an Entity with a composite key, like this one: public class Entity { public virtual Int32 FirstId { get; set; } public virtual Guid SecondId { ...
1
vote
1answer
218 views

Calling Web API via OData implementation to return records that have a foreign key to another record - not working

I have two tables in SQL - one is called "ContactDetails" and the other is "Departments". The relationship between the two are 1 to many. 1 ContactDetails record to many Department records. I am ...
0
votes
1answer
311 views

ASP.NET Web Api OData: How to validate Delta<Entity>?

I have a Validation Framework set up to automatically validate parameters of Web Api action methods (including OData action methods). However, this does not work for PATCH requests that store the ...
0
votes
1answer
90 views

Breezejs inline count

In BreezeController: public IQueryable<Entities> Index() { return this.context.entities.Where(e => e.value > 100); } Breeze query query.inlineCount(true) returns count after Where, ...
2
votes
1answer
690 views

ASP.NET MVC Web API and passing oData query

I'm currently executing Web API with oData filter requests as follows: public IQueryable<OrganizationViewModel> Get(ODataQueryOptions<Organization> oDataQuery) { var query = new ...
0
votes
1answer
290 views

How to limit the amount of data from an OData request?

I have a Users table of 76 users and UserGroups table. Using MVC, OData, a generic repository and EF, I am trying to optimize data retrieval when filtering based on the user group: ...
0
votes
0answers
210 views

Session lifetime using autofac in MVC4/5

I have searched everywhere and read pretty much everything written about session lifetime injections in autofac. There really seems to be no easy to use solution. What I want to do is have a session ...
0
votes
1answer
199 views

Asp.net web api odata substringof null issue

I am using ASP.NET WEB API Odata libraries. If I use substringof in my call and the value is null it fails. The URI I am passing is: ... odata/MyEntity()?$filter=substringof(null,Name) ... And the ...
1
vote
1answer
204 views

Existing navigation properties missing

I'm currently in the process of checking out the possibilities of OData on an already existing Web Api project. Using Code First, I'm creating all models from scratch so that I have absolute control ...
0
votes
1answer
232 views

ASP.NET MVC 5 nightly builds - Error trying $expand on a nullable Navigation Property

I'm using the latest ASP.NET nightlybuilds. On my REST API (EntitySetController based), when I try to $expand a navigation property which is null in the database, I get the following error: ...
0
votes
1answer
628 views

OData in Web API Doesn't Follow OData Standard Specs

First of, the standard spec for OData response looks like: { "d" : { "results": [ { "__metadata": { "uri": "http://demos/Orders(10248)", ...
0
votes
2answers
339 views

Can I consume a server-paged OData result in ASP.NET MVC?

I'd like to consume a server-paged OData result. That means, the JSON code includes an element "__next": "http://server/odata.svc/table?$skiptoken=guid'4dda1cd9-7eff-423f-a314-08edf26a22e8'" How ...
0
votes
1answer
476 views

SQL with MVC 4 WebAPI

I've found enough MVC 4 API samples that use a hard-coded array as the data source, but am having trouble finding a simple example with and SQL query. I have this model: public class Person { ...
0
votes
1answer
241 views

Entity version in odata using accept header in web api

I am using Web API to create RESTful services. I decided to using Accept header as a api versioning mechanism by following this implementation. ...
0
votes
1answer
163 views

OData services in ASP.Net

I have an O-Data service, and I already consumed it in ASP.Net project using VS 2012 Now i want to use an ASP.Net User Control to handle CRUD operations for this odata service automatically. I hope ...
2
votes
1answer
1k views

Breeze.js failing with Could not load file or assembly System.Web.Http.OData, Version=4.0.0.0

I'm trying out Breeze.Js and everything compiles and i have a breeze-decorated controller, but when trying to access the data I receive an error about an assembly which breeze.js has referenced, but ...
6
votes
1answer
920 views

Limit serverside results from WebApi controller and ODATA w/ Nhibernate

I've created a WebApi project in VS 2012, using NHibernate as my ORM and i intend to enable Odata support on it. So i've created a test controller with a single Get method that returns a list of ...
1
vote
4answers
2k views

Web API, OData, $inlinecount and testing

I previously had a Web API controller that looked like this: public IQueryable<ApiDesignOverview> GetList( string brandIds = "", string categoryIds = "", string ...