O'Reilly logo

Extending Microsoft Dynamics NAV 2016 Cookbook by Alexander Drogin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Querying NAV OData web services with LINQ

Language Integrated Query (LINQ) is an extremely convenient interface for writing SQL queries in .NET languages. SQL-like queries are integrated in the .NET syntax, so that the developer can write application code and database queries in a unified way instead of injecting database interaction statements in text constants.

The System.Linq library allows access to different data sources, including OData service interfaces.

How to do it...

Now we will walk through receiving data from a NAV page with a LINQ query.

  1. Publish page 42 Sales Order as a web service. Refer to the Exposing and consuming OData web services recipe for a step-by-step description of OData service publishing. Assign the name SalesOrder to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required