Simple.Data is a lightweight framework that uses the dynamic features of .NET 4 to provide an expressive, ORM-ish way of accessing and manipulating data without any of the code pre-generation and boilerplate required by other frameworks.


Use the index below to find the information you require.

Getting Started

Retrieving Data

Commands that retrieve multiple results as a SimpleQuery object.

Commands that return a single result as a SimpleRecord object

Commands that return a single scalar result

Query modifiers

Table Joins

Aggregate Functions

Helper Functions

Modifying Data

Testing Your Code

Simple.Data provides the InMemoryAdapter for unit testing

Further Tasks


Simple.Data offers you the opportunity to code against many databases in more IDEs, so for the purposes of this documentation the following choices have been made

  • IDE : Visual Studio 2010
  • Server : SQL Server 2008
  • Database : MVCMusicStore
  • Language : C#

Sample Code

All samples in this documentation are part of the Simple.Data.Sample package which you can download as a NuGet package or from github at

Sample Database

MVCMusicStore is part of an open source ASP.NET MVC project created by the ASP.NET team. You can find the complete project on Codeplex. Thanks to Jon Galloway for letting us use it.

MVC Music Store DB Schema

Additional Resources

There are several places to check for information about Simple.Data

  • Mark’s github page contains the project for Simple.Data.Core, as well as all the providers for various DBs, the sample code and the source for this documentation
  • The Simple.Data Google group is the place to ask for help and discussion
  • Mark’s blog is the place to learn about new developments in Simple.Data
  • This documentation site will continue to be updated via its github project. Please fork it and contribute


Simple.Data.Pad (download here) is a GUI tool a bit like LINQPad, except it only works with Simple.Data. To use it, extract it from its zip archive onto a local disk, and run Simple.Data.Pad.exe.

The drop-down at the top left lets you choose an Open... method, and you can enter the parameters in the text boxes that appear when you've chosen one. Simple.Data.Pad comes with the SqlServer assembly, but you can drop any of the other adapter or provider assemblies in the app folder and it should pick them up.

To run a query, type it into the big text box. As you type, you should get an autocomplete box showing you available methods and properties, generated from the schema of the database you’re connected to.

Press F5 to run queries.

The Trace tab should show the SQL that was run against the database for the most recent query.

v1.0.0.0 is in no way anywhere near production quality. In particular, it doesn’t handle exceptions yet. It won’t kill you, though, or do bad things to your database, although stick to data retrieval queries for the time being.


Simple.Data was created by Mark Rendle (

Six plug-ins have been additionally created

Documentation collated and written by Dan Maharry