DA LINQ Sample (.NET)
From RemObjects Wiki
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:
- Basic data fetching using a simple SELECT or a more complex JOIN query expression.
- Editing and updating data using DA LINQ.
- Using the DABindingList class to bind editable LINQ classes to a grid.

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
- Run the Sample Server.
- Run DA LINQ Sample.
- Fetch data, using DA LINQ, on the first tab.
- Edit data, using DA LINQ, on the second tab.
- Select and update data, represented as DABindingList, in the grid on the third tab.
Editions and Languages
- Data Abstract for .NET — available C#, Delphi Prism and VB
Note: because LINQ is available in .NET 3.5 only, this sample does not ship in a version for Visual Studio 2005.
Concepts Covered
- DA LINQ
- Indirectly: DA SQL, Dynamic Where and Dynamic Select
See Also
Product: RemObjects Data Abstract
Available Editions: Data Abstract for .NET, Delphi and Xcode
Glossary — Architecture — Articles — Features — Library — Samples