Click here to Skip to main content
15,891,708 members
Everything / OData

OData

OData

Great Reads

by Jovan Popovic(MSFT)
Create powerful REST API with just few lines of C# code using MsSql.RestApi package
by Pawel idzikowski
How to replace the web API request query string to provide case insensitive OData search
by NobsterTheLobster
Consume data from a WCF Data service in a .NET client. MSAL OAuth 2.0
by Herman.Instance
Migrations does not apply to T-SQL rules for ALTER TABLE ALTER COLUMN

Latest Articles

by Herman.Instance
Migrations does not apply to T-SQL rules for ALTER TABLE ALTER COLUMN
by Sunny Makode
This is an introductory article about creating an Odata Rest API in collaboration with Entity Framework. We are also going to use Autofac as our IOC container. Also, Repository and Unit of Work pattern will be used for cleaner access of persistence model through our ORM (Entity Framework).
by Jeremy Likness
Build data-driven .NET applications with seamless client-server communication using fluent C# LINQ over OData (like GraphQL but without the JSON).
by Jovan Popovic(MSFT)
Create powerful REST API with just few lines of C# code using MsSql.RestApi package

All Articles

Sort by Title

OData 

22 Nov 2013 by Vagif Abilov
The article describes limitations of WCF Data Services client and shows how Simple.OData.Client can become a better alternative
4 Apr 2013 by Rahul Rajat Singh
In this article we will see how we can use WCF data services to create ODATA complaint RESTful services.
10 Feb 2017 by Jerod Johnson
Use the CData Software API Server to create an OData service for your databases and build a dynamic Web app based on the database data.
7 Sep 2017 by Herman<T>.Instance
Hi everyone, In my organisation we have a WPF application that connects to an ODATA layer. That layer connects to the database. The database is in a cluster. I was wondering who has experience with such a setup as described. What reactions can I expect in the ODATA layer and in the WPF...
21 Nov 2019 by Jeremy Likness
Build data-driven .NET applications with seamless client-server communication using fluent C# LINQ over OData (like GraphQL but without the JSON).
21 Aug 2014 by sam3440
AS a beginner I want to become familiar with using oData protocol in WebApi. Can any one recommend good book for oData services using WebApi.Should I definitely install webTools to use Web API 2.2 Much Appreciated, Thanks.
21 Aug 2014 by Peter Leow
Refer: odata-support-in-aspnet-web-api[^]
31 Jan 2018 by Pawel idzikowski
How to replace the web API request query string to provide case insensitive OData search
14 May 2018 by NobsterTheLobster
Consume data from a WCF Data service in a .NET client. MSAL OAuth 2.0
3 Sep 2012 by deepakdynamite
i need to change our c# code that reads the datatable in the web service and have it read the odata and convert directly or use as a datatable. i need a datatable provider that uses odata
3 Sep 2012 by Kuthuparakkal
May this help you:Advanced using OData in .NET: WCF Data Services[^]
15 May 2018 by NobsterTheLobster
Publish a WCF DataService with entity model, updatable views, filtering and authentication
28 Nov 2016 by Neal Pandey
This article is a tutorial on creating a basic OData (Open Data Protocol) endpoint for a MongoDB database using MEAN stack.
16 Jul 2013 by DyldoB
Our company recently acquired Office 365 Sharepoint Online and the employees have been tasked with managing their projects through the system.Capturing tasks and time is terrible through the current interface which has led me to investigating creating a web interface which interacts with the...
10 Feb 2016 by Siddharth R Barman
Quick introduction to oData (v4) by understanding how to implement CRUD method using ASP.NET Web API
31 Jul 2013 by nwhitfield
Mobile, geo-centric app for Business Users, Consumers and Sales/Marketing Professionals
8 May 2014 by LiQuick
Dear reader,I'm currently trying to access the results of a SAP Gateway ODATA service but one particular method doesn't seem to comply with .net result expectations. The code below is what I'm using and the result is that all the entries are filled with the values of the last entry. LINQPad...
11 May 2014 by LiQuick
Found out what the problem is:There was a KEY defined in the SAP Gateway datamodel, but the returned data didn't contain a key. Somehow the default key was an empty string for each entry, so with the adding of each entry all the data containing the specific key '' would be updated, hence the...
6 Sep 2015 by basitsar
Dear,I have created data services, below is my login code working fine.var _url = "http://localhost/CMWeb/DataService.svc/Users?$filter=UserName eq '" + "Basit" + "' and Password eq '" + "s" + "'&$format=json"; UserAdmin = 0, $.ajax({ type:...
6 Oct 2015 by rdamske
I am using OData/EF6 and I have coded up my ChangeInterceptors. I was wondering if I need to do something to ensure that two users do not step on each other if both happen to execute the same ChangeInterceptor at the same time. I cannot find anything either way about this.Russ
17 Aug 2018 by Herman<T>.Instance
Hi Folks, in my ODATA service I use EF6 to work with SQL Server. An EDMX is created also for the table Departments. In that table there is a TimeStamp field for Concurrency purposes. And yes I have added [Timestamp] data annotation in the code. And in the EDMX the field is FIXED for Concurrency...
17 Aug 2018 by Dave Kreskowiak
You never gave any details about your database schema as coded in EF, so this is just a guess. What you're seeing is the expected behavior. You are NOT supposed to make any changes to a column tagged [Timestamp] in EF. Timestamp fields are entirely managed by EF. They are used to manage...
2 Nov 2021 by Herman<T>.Instance
Migrations does not apply to T-SQL rules for ALTER TABLE ALTER COLUMN
14 Nov 2016 by Pabbock
Hello everybody,I'd been trying to find a way to get the info from the last month on of an OData Feed. I know how to get it if a write the specific date but I need the expression to detect by itself the last month of the actual month we are.What I have tried:So far I have this...
24 Jul 2020 by Herman<T>.Instance
Hi Folks, I have a Stored Procedure that retrieves with dynamic column names the results from parameters with dynamic parameter names. In SSMS I see the correct result. I have to expose this DataSet via Entity Framework in my OData Controller. ...
18 Feb 2019 by LiQuick
Dear readers, For a project I need to expose a third party API partly to the public. To do this I thought I could easily get in incoming request, reroute it to the API, get response back and deliver response to the client. Pretty simple concept in theory, but somehow problematic. Partly the...
18 Feb 2019 by Derek Viljoen
Run Postman against your service API and see what it gives you. Try to duplicate exactly what your proxy is generating (look specifically at the HTTP headers). You can verify this in Fiddler. Are you sending content-type, and if so what is it set to? Are you sending an 'accept' header in the...
12 Jun 2015 by SM-2015
I am new to the MVVM pattern and WCF Data Services so please bear with me. I am trying to create a solution with a WCF DataServices project (I have followed https://msdn.microsoft.com/en-us/library/dd728275(v=vs.110).aspx for the DataService as a guide).I then want to consume the service...
20 Jul 2021 by Member 11030334
I wrote an HTTPClient (.NET Core 3.x) that returns a JSON string but when I try to Deserialize it I run into issues. Issues ranging from can not deserialize array to string or the results are null. The string itself I can view on a Quick Watch...
20 Jul 2021 by Member 11030334
SOLVED I did not want to work with an OData Json object, so I had to strip the OData header and the rest just looked like a collection of JSON docs content = httpResponse.Content.ReadAsStringAsync().Result; var outer =...
5 Aug 2014 by Yogesh Vardhmane
Hi,I am trying to consume WCF Odata Service in BreezeController. I need to set Metadata for BreezeController. But I am not able to fetch Metadata through WCF Odata Service.I am not very sure on why Breezecontroller needs Metadata.Note:- I am using EntityFramework in my Odata...
13 Aug 2018 by Mike V Baker
I'm working on a react-native prototype and trying to introduce react-odata. https://www.npmjs.com/package/react-odata has the following sample code in the readme file: const baseUrl = 'http://services.odata.org/V4/TripPinService/People'; const query = { filter: { FirstName: 'Russell' } }; ...
13 Aug 2018 by Mike V Baker
As it turns out the call to odata was just fine, it was the syntax of the listitems that was wrong { data && { function(data) ( // PAREN HERE ) // AND HERE } } Switched the braces out and put in parens instead.
15 Jun 2014 by wujapan
Hi i'm trying to post model to a web api where every time only one item in the model shown up at post method. like if i'm posting a model called Movie ,Id and Title are the properties of this model.so here my problem is when i'm trying to post it from client side using knockout.js,only Title...
4 May 2015 by Member 11662814
How Do i read the Odata standard $ count value in the java when Consuming through the Rest Template.1.I am hitting the service through Rest template Url Example:
10 Aug 2015 by Member 11898286
please tell me any solution.i follow some link but not get right way.http://stackoverflow.com/questions/23288237/visual-studio-2013-server-explorer-custom-data-provider-mongodb" target="_blank" title="New Window">^]
15 Jul 2013 by indra.217
how to create ODATA Services for Windows Phone 7 in C# in order to use in Windows Phone Emulator?
12 Aug 2022 by Member 15090354
Hi Team, I am using Odata in our application due to that i am not able to call web api methods in Postman or web browser Could you please suggest how to create web api methods same as normal web api methods [EnableQuery] public...
26 Mar 2020 by clemenslinders
LS, In D365BC I created a simple table, card page and list page. You can create a list of workers entering: first name, last name and function. I turned the card page into a web service and now there is a ODATA V3, ODATA V4 and SOAP web service...
26 Mar 2020 by Richard MacCutchan
The 404 message tells you that the page was not found, so you need to check the URL. If it is correct then you will need to debug the server code to see why it raises that error.
26 Mar 2020 by clemenslinders
HI Richard, Thanks for your input. But I received the solution from Gert. For deletion I do not have to pass the E-tag, but I can pass the primary key. Although using the Soap web service I do pass the E-tag. It works when I changed my code...
13 Jan 2016 by NaVeN Kumar
Hi All,I am very new to OData service. I have created a WebAPi Odata Service with Entity Framework. I am able to get the data from service using HttpClient. I am trying to pass id value to find a record. I am not sure how to pass value to service.Below is my code:public string...
16 Jul 2015 by basitsar
Dear,I created OData Services with Custom Authentication, How to pass the UserName & Password in Ajax. Note that without having security below code working fine.Please help on thisBelow is my Code var _url = "http://localhost:49497/DataService.svc/Mst_User?$filter=Us_Name eq...
16 Jul 2015 by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
I suggest you to...Store hashed password in database instead of plain text.Make that service HTTPS enabled so that connection will be secure.
17 Jul 2015 by Anil Vaghasiya
var _url = "http://localhost:49497/DataService.svc/Mst_User?$filter=Us_Name eq 'Basit' and Us_Password eq 's'&$format=json"; $.ajax({ type: "POST", data: "{ strFUserName: '" + VariableUsername + "', strFPassword: '" + Variablepassword + "'}", ...
22 May 2014 by Jitendra Sabat
My Angular code goes belowvar data=['asdfgh','fghjkl','qwerty'];return $http.post(url, JSON.stringify(data)).then(function (result) { return result.data; });My web api controller is public class V1MessageController :...
4 Dec 2015 by databoom
This tip resolves the problem of Kendo Grid losing the focus after editing in autoSynch mode.
29 Dec 2015 by databoom
This tip is about how to tune up the Kendo Grid when using its authentication feature.
12 May 2015 by Member 10503105
I am using DataTables[^] to draw my data. Also I am using OData filter to show only those rows which I need, by several conditions.var dtApi = new $.fn.dataTable.Api("#CardsGrid_grid");...filter assing (for example: "Status eq 0" and...)...dtApi.draw();It works fine. I am receiving...
12 May 2015 by hypermellow
Hi,I've not used the DataTables API (like you posted above), but if you are looking to search a specific column then I would do it like://Global variable for DataTable ... var dt;//Create your DataTable ... function createDataTable(){ dt =...
31 Aug 2015 by Member 11949649
I dnt understand the problem is wether it from my code or in iis server,this is email-rupi2009@gmail.complease give me the solution.
14 Feb 2016 by Member 11915386
I'm trying to port a Web API I wrote in ASP.Net 4.5.2 to ASP.Net 5 for the cross platform support, which turns out to be a critical issue. In my former web api I implemented an OData solution, but when trying to port my web api to ASP.Net 5 I was unable to use System.Web let alone...
14 Feb 2016 by Abhinav S
There is no need for System.web in ASP.Net 5.You need to use .Net core instead.Alternately, switch back to version 4.5.2.References - ScottGu's Blog - Introducing ASP.NET 5[^].Top 10 Changes in ASP.NET 5 and MVC 6 | Stephen Walther[^]
28 Feb 2014 by Asif Rehman
$(document).ready(function () { var qry = "Db.svc/CustTypes?select=CustTypeTitle&$format=json"; $('#Makes').autocomplete({ source: qry }); }); 1. I'm unable to extract...
13 Aug 2018 by Mike V Baker
I learning react-native. I'm trying to display a really simple list of products from a database call. The data is loading but for some reason the individual items are not being loaded into the list. What I have tried: import React, { Component } from 'react'; import { Text, View, ...
13 Aug 2018 by Mike V Baker
So it turns out that it was just a problem of using braces {} where I should have used parens () render() { return ( { this.state && this.state.products &&...
13 Aug 2015 by OriginalGriff
Provided that the links to your site are to the database download itself only, it probably wouldn't be a problem. But...it would be better to add the database as a zipped download to the article itself, so it is hosted here. That way, if your site is down for any reason the article isn't broken...
13 Jul 2012 by Nunnenkamp
http://crmDoma...
5 Nov 2018 by Jovan Popovic(MSFT)
Create powerful REST API with just few lines of C# code using MsSql.RestApi package
30 Oct 2012 by pHiLL87
Hello,is their any documentation to write an own service for the DQS third part reference of the MS SQL 2012 Server yet?I won't use the azure data market so i only need to know how to create a own web service for the reference ("Third Party Reference" in the configuration menu -...
5 Jun 2014 by soft.prof
Hi,can anyone tell me an approach to perform data synchronization from two different data models using WCF services.Requirement is as follows:Data model-A has entity framework generated objects which needs to be mapped with the external Data model-B.For example:Data model - A:...
5 Jun 2014 by Suvabrata Roy
Ok, Now I assume that its a database near about 5 GB and increment on regular basis about 0.09%.I also assume that its reside on remote that mean two databases cant talk directly.Few prerequisites :Each Table you need to synchronize they should have one primary key.Using...
8 Dec 2019 by Sunny Makode
This is an introductory article about creating an Odata Rest API in collaboration with Entity Framework. We are also going to use Autofac as our IOC container. Also, Repository and Unit of Work pattern will be used for cleaner access of persistence model through our ORM (Entity Framework).
7 Jan 2021 by Member 10870320
Please find the below query that we are sending from the from fe (react ) when we are trying to search with two text boxes .It doesnt return any result. However an oData query with two dropdowns / onetextbox and one dropdown works/single...
6 Jan 2021 by Member 10870320
The full URL is https://localhost:3333/OverviewItem?$count=true&$filter=(contains(name1,'seek') and contains(name2,'aron') &$orderby=name1 desc,name2 desc &$skip=0&$top=10 Even i removed after the $ part still same issue then we find that...
6 Jan 2021 by Richard MacCutchan
You already posted this at Odata - query requests with two contains doent work[^]. Please do not repost the same question.
10 Jun 2022 by kmoorevs
I have the following request that gives me the data that I need. The problem I am having is that I need the Quantity summed and grouped by the remaining columns/objects. I have removed the html encoding to improve readability. ...
10 Jun 2022 by rnbergren
The vendor will have to setup the odata feed for you I think. I don't know of any way off the top of my head to do this. I would probably reach out to the vendor and ask. Or I would download the subset without any filtering etc.. and then group...
31 Aug 2012 by deepakdynamite
Hello,Is it possible to convert Odata into DataTable and Vice-Versa ?Thanks
31 Aug 2012 by Sandeep Mewara
Here, have a look at this article: MSDN: Slice and Dice OData with the jQuery DataTables Plug-In[^]
2 Mar 2014 by Jovan Popovic(MSFT)
There is a new connector for jQuery DataTables for OData service. It handles OData services v2, v3, v4. See DataTables OData connector[^]You just need to include the connector js file and setup few parameters in dataTables initialization.
14 Aug 2014 by zolea
Hi,I am trying to find the best way to pass exceptions or messages from my Odata Service back to an Odata web forms client.On the service, when I call this controller:public async Task Post(Products product){ var message = "Product with id = not found"; throw new...
1 Sep 2014 by zolea
I'm still struggling with this. Does anyone have a hint please?Thanks.
21 Dec 2022 by Madhushanka Chithrananda
I have to read invoice line items. To Read all invoices • projection/v1/InvoiceHandling.svc This would list all the invoices in all company registered in cloud(Only Header Info) To Read exact invoice •...
21 Dec 2022 by OriginalGriff
While we are more than willing to help those that are stuck, that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for...
29 Sep 2015 by Deepak_ker
Hi,Currently I am facing some issues while querying the oData services. I am very new to oData query syntax.I am trying to query oData service using the following urlhttps://mysite/DataQueryGroups?$select=Id,Name&$filter=IsHidden eq false&IsShared ne...
18 Apr 2016 by Shawn1Xu
OData Interoperability with .NET C# and Java applications
21 Oct 2012 by VivekUtsa
Hello all,I'm trying to generate a query which will have a inner join between 2 tables, I was able to do that with oData Query generator tool , but was not able to include columns from second table in to the filter I'm putting it more clearly below in SQL terms.Select a.Col1, a.col2,...
21 Oct 2012 by Afzal Shaikh
Query seems correct , Please convert parameter @startdate to appropriate date format like that Convert(DateTime,@startdate,Number).or Try with this Select a.Col1, a.col2, b.col1, b.col2from a inner join bon a.id = b.idwhere a.id = @id and Convert(DateTime,b.startdate,103)=...
21 Aug 2017 by NaVeN Kumar
Hi, I would like to filter the records based on child table data using odata query. Example I have tables like below. Employee contains empId and Name, EmployeeText is having empId, languageid and Text Employees EmpId Name 1 Test 2 Test2 EmployeeText empId LanguageId Text 1 ...
10 Feb 2015 by Jeroen E
From an MVVM application I get the following URL for delete: http://localhost/Recruiters/Addresses(guid '7777-777')/CIP.Domain.AddressesI did not fill complete guid in the example URL, but it is a valid one.This URL is not a normal OData route, so I created an routing...
16 Feb 2015 by Jeroen E
There were two problems with this as it turns out:First:My web.config was not properly set up to handle a dot in the URL.So I changed it to this: verb="*" type="System.Web.Handlers.TransferRequestHandler" ...
25 Sep 2015 by Rajneesh Kumar Verma
Using OData and WCF Service and visualize result using LinqPad
7 Jun 2012 by Jovan Popovic(MSFT)
How to create OData services using the WCF Data Services and use them
18 Oct 2012 by mohsen_alikhani
How to implement OData in ASP .NET MVC 4 Web API as same as WCF Data Service Using Visual Studio 2012?
18 Oct 2012 by mohsen_alikhani
If you followed this URL : OData support in ASP.NET Web API[]You will see that the MVC 4 Web API version alpha have solution for it but we want supporting it in finalized version !!!
19 Oct 2012 by mohsen_alikhani
The document of the following URL lays out a roadmap for ASP.NET MVC, ASP.NET Web API, and ASP.NET Web Pages : http://aspnetwebstack.codeplex.com/wikipage?title=Roadmap []
31 Oct 2012 by mohsen_alikhani
There is no full support for OData in web app at the moment.
27 Feb 2014 by Mudita Rathore
See this links i hope this will help you for creating OData support in Web API http://www.c-sharpcorner.com/UploadFile/2b481f/odata-feed-using-Asp-Net-web-api/[^]
28 Apr 2014 by mekalareddy
I have tables DEPatientVisit and DEPhysiciani need to filter the data based on StimulatorGourpId of DEPatientVisit. what i tried for this...
11 Feb 2020 by Herman<T>.Instance
Hi All, I have created a WEBAPI (ASP.NET and using Microsoft.AspNet.OData packages to have a V4 version of OData. In my own defined OData Controllers (based on stored procedures exposed via Entity Framework) I have Get Methods to retrieve data....
13 Mar 2020 by Herman<T>.Instance
Hi friends, Struggling with OData V4 when calling a Function. My Client sends to the service: http://wrk2198:80/services/ProjectUsedModels(modelNumber='10000') The webapi service expects:...
30 Nov 2019 by Asif Rehman
This is working fine. public IHttpActionResult Post(Categories categories) { //... } But When I change Categories to Categories[] to received multiple records from javascript client, it show null object. public IHttpActionResult Post(Categories[] categories) { //... } from postman...
30 Nov 2019 by Ashutosh Gpt
create another class contains list of Categories public class CategoriesList { IList ListItem; } public IHttpActionResult Post(CategoriesList categories) { //... } body may something like this: ListItem : [ { id: 1, Category: 'Value1' }, { id: 2, Category: 'Value2' } ]
14 Jan 2015 by anurag9179
Hello,I am working project server 2013. I am facing some issues regarding In-built report in Project server/ SharePoint 2013. When I open In-Built report, specially Project Overview dashboard reports which uses oData Connection and i think the oData connection may be the cause of this issue,...
4 Nov 2014 by Jeroen E
Hello,I have a database containing 2 tables:- recruiters- AddressesThese tables have a n:m relationship.I connect with the database through an OData api.I'm trying to get the addresses of a specific recruiter but can't get it to work.What I've tried is:var...