Simple.Data

Simple.Data defines a number of commands for retrieving data from a data store. These can then be daisychained in a LINQ-like fashion with further methods to modify the basic query.

All

The All method returns all data from a table.

Syntax

public SimpleQuery All(
		Object[] filterExpressions
	)

Parameters

filterExpressions
Type: object[]
All parameters in filterExpressions are silently ignored by All().

Return Value

Type: SimpleQuery
A collection of SimpleRecord objects which can be iterated over.

Examples

The following example returns all the rows of the Albums table and outputs all the album titles to the Console window.

var albums = Database.Open().Albums.All();
foreach (var album in albums)
{
  Console.WriteLine(album.Title);
}

Simple.Data sends the following SQL to the database when albums is evaluated.

select   
   [dbo].[Album].[AlbumId],
   [dbo].[Album].[GenreId],
   [dbo].[Album].[ArtistId],
   [dbo].[Album].[Title],
   [dbo].[Album].[Price],
   [dbo].[Album].[AlbumArtUrl] 
from [dbo].[Album]

(which equates to select * from [dbo].[Album])