DA LINQ Sample (.NET)

From RemObjects Wiki

Jump to:navigation, search
.NET Platform Header-48.png

This is a Data Abstract for .NET Samples topic
Feel free to add your notes to this topic below.


Contents

Purpose

This sample shows how to use DA LINQ and Language Integrated Query features in C# 3.0, Delphi Prism and VB 9.0 to write strongly typed data access code.

Three tabs are provided to show off individual features:

DataAbstractDaLinqSample1.png

An option is provided to submit DA LINQ requests either through DA SQL (which allows more powerful query expressions, but is limited to .NET based servers) or Dynamic Where and Dynamic Select (which is supported by Delphi servers).

The screenshot shows the first case, fecthing data using a simple SELECT query as follows:

String lCountry = "UK";

var lQuery =
  from w in linqRemoteDataAdapter.GetTable<Worker>()
  where w.WorkerCountry == lCountry
  select new { w.WorkerID, FullName = w.WorkerFirstName + " " + w.WorkerLastName, w.WorkerPhone };

Getting Started

Editions and Languages

Note: because LINQ is available in .NET 3.5 only, this sample does not ship in a version for Visual Studio 2005.

Concepts Covered


See Also


Da-48.png

Product: RemObjects Data Abstract
Available Editions: Data Abstract for .NET, Delphi and Xcode

GlossaryArchitectureArticlesFeaturesLibrarySamples

Navigation
products
hubs
special
Toolbox