Index
Use the index below to find the information you require.
Getting Started
- What Is Simple.Data?
- Supported Databases
- Requirements And Dependencies
- Where To Download It
- Configuration
- Opening A Connection
- Sharing A Connection
- Naming Conventions !!! : The ‘Fluid’ and the ‘Indexer’ way
Retrieving Data
Commands that retrieve multiple results as a SimpleQuery object.
- All
- FindAll
- FindAllBy
Query
andQueryBy
are now deprecated in favour of using All and FindAllBy respectively.
Commands that return a single result as a SimpleRecord object
- Find
- Get
FindBy
is now deprecated in favour of using FindAllBy.FirstOrDefault() or Get. More details here.
Commands that return a single scalar result
- GetCount
- GetCountBy
- Exists, Any
- ExistsBy, AnyBy
GetScalar
is now deprecated in favour of applying ToScalar() or ToScalarOrDefault() to FindAllBy.FirstOrDefault() or Get()
Query modifiers
- Column Selection : Select, Star and AllColumns
- Retrieving Distinct Values : Distinct
- Column Aliasing : As
- Where Clauses : Where, Operators, IN, BETWEEN, LIKE, IS NULL
- Ordering Results : OrderBy, OrderByDescending, ThenBy, ThenByDescending
Table Joins
- “Lazy-loading” and “Eager-loading” & evaluation strategies in Simple.Data.
- Lazy-loading joins : Natural Joins, Join, LeftJoin & OuterJoin
- Eager-loading joins : With, WithOne, WithMany
Aggregate Functions
- Grouping And Aggregates : Having, Min, Max, Avg, Sum
- Counting Columns : Count, CountDistinct
Helper Functions
- String length : Length (new)
- Casting to Scalar values
ToScalar, ToScalarList, ToScalarArray, ToScalarOrDefault - Casting to objects
Implicit Casting, Cast<T>, ToList, ToList<T>, ToArray, ToArray<T> - Paging functions
Skip, Take, WithTotalCount (forthcoming) - LINQ-like functions
First, FirstOrDefault, Single, SingleOrDefault(forthcoming)
Modifying Data
- Adding Data : Insert (preliminary)
- Updating Data : Update, UpdateAll (preliminary)
- Upserting Data : Upsert (forthcoming)
- Deleting Data : Delete, DeleteAll (preliminary)
Testing Your Code
Simple.Data provides the InMemoryAdapter for unit testing
- Basics : Testing Data Retrieval
- Advanced : Testing Data Modification, Stored Procedures and Transactions
- Configuring the InMemoryAdapter : SetKeyColumn, SetAutoincrementColumn, ConfigureJoin
Further Tasks
- Calling Stored Procedures from Simple.Data (preliminary)
- Wrapping your data store calls in a transaction (preliminary)