Sam Xu

Senior Software Engineer, OData, Microsoft Graph, Open API, Swagger

Sam is a Senior software engineer at Microsoft with over than 10 years of software developement experience. He's worked on a wide variety of platforms such as (C++, C#, etc.) and currently works on the OData team to design and implement features in the .NET stack of Microsoft's OData libraries. OData (Open Data Protocol) is an ISO/IEC approved, OASIS standard that defines a set of best practices for building and consuming RESTful APIs. You can find more information about OData at https://odata.org You can track his contributions at: https://github.com/xuzhg and https://stackoverflow.com/users/3304931/sam-xu.

Post by this author

Enable Un-typed within ASP.NET Core OData

Introduction The latest ASP.NET Core OData supports the following two built-in OData abstract types: Developers can use them to advertise a property in OData metadata schema (aka, Edm model) so that such property is declared with a particular name present, but there is no type associated to describe the structure of the ...

Enable CBOR within ASP.NET Core OData

Introduction CBOR, which stands for Concise Binary Object Representation, is a data format whose design goals include the possibility of extremely small code size, small message size, and extensibility without the need for version negotiation (from cbor.io). CBOR is based on the wildly successful JSON (aka, JavaScript Object Notation) data ...

Customize OData payload serialization format within ASP.NET Core OData

Introduction JSON (aka, JavaScript Object Notation), a standard text-based format for representing structured data based on JavaScript object syntax, is the default representation for the OData requests and responses payload, see OData JSON format here. It’s a very popular format and widely used in most scenarios. However, there are ...

Extension: Omit null value properties in ASP.NET Core OData

Introduction By default, ASP.NET Core OData serializes a single value property as “null”, and a collection value property as an empty array if its value is null as such: It’s good for most scenarios. However, omitting those 'annoying' null-value properties from the OData response gets more and more attention. Along with the latest ...

Tutorial: Build gRPC & OData in ASP.NET Core

Introduction gRPC (google Remote Procedure Call) is a high-performance remote procedure call framework that helps developers to build and consume remote services using the same way as calling local APIs. Different from gRPC, OData (Open Data Protocol) is an OASIS standard that defines a set of best practices for developers to build and ...

$compute and $search in ASP.NET Core OData 8

Introduction OData system query options, such as $filter, $orderby, are a set of query string parameters that control the amount and order of the data returned for the resource identified by the URL. In the latest version of ASP.NET Core OData, two new system query options as follows are enabled: Along with other query options, $...

Build formatter extensions in ASP.NET Core OData 8 and hooks in ODataConnectedService

Introduction In this post, I will create formatter extensions in an OData web service and request/response hooks in an OData client application to generate/consume ETag control information. ETag (aka entity tag), one of OData control information that may be applied to an entity or collection in response, can be used in a subsequent request to...

API versioning extension with ASP.NET Core OData 8

Introduction API versioning can help evolving our APIs without changing or breaking the existing API services. URL segment, request header, and query string are three ways to achieve API versioning in ASP.NET Core application. ASP.NET Core OData 8, built upon ASP.NET Core, has the built-in API versioning functionality via route URL prefix ...

Attribute Routing in ASP.NET Core OData 8.0 RC

Introduction Attribute routing is how Web API matches the incoming HTTP requests to an action based on route template attributes decorated on controller or action. ASP.NET Core defines a set of route template attributes to enable attribute routing, such as RouteAttribute, HttpGetAttribute etc. ASP.NET Core OData 8.0 RC supports these ...

Routing in ASP.NET Core OData 8.0 Preview

Introduction In the previous version of ASP.NET Core OData, such as 6.x and 7.x version, the OData routing is IRouter-based Web API Routing, that is, OData router is a Router implementing IRouter interface. Even in the ASP.NET Core OData 7.x Endpoint Routing, it is also related to the IRouter routing. Since 8.0, we want to build the OData ...