Commit 15d259f0 authored by Marc Gravell's avatar Marc Gravell

1.9 release

parent 8a9e1c7b
...@@ -32,5 +32,5 @@ ...@@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.8.0.0")] [assembly: AssemblyVersion("1.9.0.0")]
[assembly: AssemblyFileVersion("1.8.0.0")] [assembly: AssemblyFileVersion("1.9.0.0")]
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata schemaVersion="2"> <metadata schemaVersion="2">
<id>Dapper</id> <id>Dapper</id>
<version>1.8</version> <version>1.9</version>
<title>Dapper dot net</title> <title>Dapper dot net</title>
<authors>Sam Saffron,Marc Gravell</authors> <authors>Sam Saffron,Marc Gravell</authors>
<owners>Sam Saffron,Marc Gravell</owners> <owners>Sam Saffron,Marc Gravell</owners>
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0</licenseUrl> <licenseUrl>http://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
<projectUrl>http://code.google.com/p/dapper-dot-net/</projectUrl> <projectUrl>http://code.google.com/p/dapper-dot-net/</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance> <requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>A high performance Micro-ORM supporting Sql Server, MySQL, Sqlite, SqlCE, Firebird etc..</description> <description>A high performance Micro-ORM supporting Sql Server, MySQL, Sqlite, SqlCE, Firebird etc..</description>
<summary>A high performance Micro-ORM</summary> <summary>A high performance Micro-ORM</summary>
<tags>orm sql micro-orm</tags> <tags>orm sql micro-orm</tags>
<frameworkAssemblies> <frameworkAssemblies>
<frameworkAssembly assemblyName="System.Core"/> <frameworkAssembly assemblyName="System.Core"/>
<frameworkAssembly assemblyName="System"/> <frameworkAssembly assemblyName="System"/>
<frameworkAssembly assemblyName="System.Data"/> <frameworkAssembly assemblyName="System.Data"/>
<frameworkAssembly assemblyName="Microsoft.CSharp" targetFramework=".NETFramework4.0-Client, .NETFramework4.0" /> <frameworkAssembly assemblyName="Microsoft.CSharp" targetFramework=".NETFramework4.0-Client, .NETFramework4.0" />
</frameworkAssemblies> </frameworkAssemblies>
<releaseNotes> <releaseNotes>
* 1.8 - Started release notes * 1.9 - Started release notes
* Important: Dapper is now shipping as a DLL which will work on .net 3.5 or .net 4.0, * Added: Better schema change detection
* This improves the debugging experience as you no longer break into dapper when SQL fails. * Fixed: Enum support for T in Query-of-T
* Added: ParameterNames on DynamicParameters * Added: Dictionary support for parameters
</releaseNotes> * 1.8 - Started release notes
</metadata> * Important: Dapper is now shipping as a DLL which will work on .net 3.5 or .net 4.0,
<files> * This improves the debugging experience as you no longer break into dapper when SQL fails.
<file src="bin\Release\Dapper.dll" target="lib\net40" /> * Added: ParameterNames on DynamicParameters
<file src="bin\Release\Dapper.pdb" target="lib\net40" /> </releaseNotes>
<file src="..\Dapper NET35\bin\Release\Dapper.dll" target="lib\net35" /> </metadata>
<file src="..\Dapper NET35\bin\Release\Dapper.pdb" target="lib\net35" /> <files>
</files> <file src="bin\Release\Dapper.dll" target="lib\net40" />
<file src="bin\Release\Dapper.pdb" target="lib\net40" />
<file src="..\Dapper NET35\bin\Release\Dapper.dll" target="lib\net35" />
<file src="..\Dapper NET35\bin\Release\Dapper.pdb" target="lib\net35" />
</files>
</package> </package>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<DirectedGraph GraphDirection="LeftToRight" xmlns="http://schemas.microsoft.com/vs/2009/dgml">
<Nodes>
<Node Id="DapperTests" Label="DapperTests" Category="Project" />
<Node Id="FSPowerPack.Community 2.0.0.0" Label="FSPowerPack.Community 2.0.0.0" Category="Package" />
<Node Id="SqlServerCompact 4.0.8482.1" Label="SqlServerCompact 4.0.8482.1" Category="Package" />
</Nodes>
<Links>
<Link Source="DapperTests" Target="FSPowerPack.Community 2.0.0.0" Category="Installed Package" />
<Link Source="DapperTests" Target="SqlServerCompact 4.0.8482.1" Category="Installed Package" />
</Links>
<Categories>
<Category Id="Project" />
<Category Id="Package" />
</Categories>
<Styles>
<Style TargetType="Node" GroupLabel="Project" ValueLabel="True">
<Condition Expression="HasCategory('Project')" />
<Setter Property="Background" Value="Blue" />
</Style>
</Styles>
</DirectedGraph>
\ No newline at end of file
Dapper - a simple object mapper for .Net Dapper - a simple object mapper for .Net
======================================== ========================================
Features Features
-------- --------
Dapper is a [single file](https://github.com/SamSaffron/dapper-dot-net/blob/master/Dapper/SqlMapper.cs) you can drop in to your project that will extend your IDbConnection interface. Dapper is a [single file](https://github.com/SamSaffron/dapper-dot-net/blob/master/Dapper/SqlMapper.cs) you can drop in to your project that will extend your IDbConnection interface.
It provides 3 helpers: It provides 3 helpers:
Execute a query and map the results to a strongly typed List Execute a query and map the results to a strongly typed List
------------------------------------------------------------ ------------------------------------------------------------
Note: all extension methods assume the connection is already open, they will fail if the connection is closed. Note: all extension methods assume the connection is already open, they will fail if the connection is closed.
```csharp ```csharp
public static IEnumerable<T> Query<T>(this IDbConnection cnn, string sql, object param = null, SqlTransaction transaction = null, bool buffered = true) public static IEnumerable<T> Query<T>(this IDbConnection cnn, string sql, object param = null, SqlTransaction transaction = null, bool buffered = true)
``` ```
Example usage: Example usage:
```csharp ```csharp
public class Dog public class Dog
{ {
public int? Age { get; set; } public int? Age { get; set; }
public Guid Id { get; set; } public Guid Id { get; set; }
public string Name { get; set; } public string Name { get; set; }
public float? Weight { get; set; } public float? Weight { get; set; }
public int IgnoredProperty { get { return 1; } } public int IgnoredProperty { get { return 1; } }
} }
var guid = Guid.NewGuid(); var guid = Guid.NewGuid();
var dog = connection.Query<Dog>("select Age = @Age, Id = @Id", new { Age = (int?)null, Id = guid }); var dog = connection.Query<Dog>("select Age = @Age, Id = @Id", new { Age = (int?)null, Id = guid });
dog.Count() dog.Count()
.IsEqualTo(1); .IsEqualTo(1);
dog.First().Age dog.First().Age
.IsNull(); .IsNull();
dog.First().Id dog.First().Id
.IsEqualTo(guid); .IsEqualTo(guid);
``` ```
Execute a query and map it to a list of dynamic objects Execute a query and map it to a list of dynamic objects
------------------------------------------------------- -------------------------------------------------------
```csharp ```csharp
public static IEnumerable<dynamic> Query (this IDbConnection cnn, string sql, object param = null, SqlTransaction transaction = null, bool buffered = true) public static IEnumerable<dynamic> Query (this IDbConnection cnn, string sql, object param = null, SqlTransaction transaction = null, bool buffered = true)
``` ```
This method will execute SQL and return a dynamic list. This method will execute SQL and return a dynamic list.
Example usage: Example usage:
```csharp ```csharp
var rows = connection.Query("select 1 A, 2 B union all select 3, 4"); var rows = connection.Query("select 1 A, 2 B union all select 3, 4");
((int)rows[0].A) ((int)rows[0].A)
.IsEqualTo(1); .IsEqualTo(1);
((int)rows[0].B) ((int)rows[0].B)
.IsEqualTo(2); .IsEqualTo(2);
((int)rows[1].A) ((int)rows[1].A)
.IsEqualTo(3); .IsEqualTo(3);
((int)rows[1].B) ((int)rows[1].B)
.IsEqualTo(4); .IsEqualTo(4);
``` ```
Execute a Command that returns no results Execute a Command that returns no results
----------------------------------------- -----------------------------------------
```csharp ```csharp
public static int Execute(this IDbConnection cnn, string sql, object param = null, SqlTransaction transaction = null) public static int Execute(this IDbConnection cnn, string sql, object param = null, SqlTransaction transaction = null)
``` ```
Example usage: Example usage:
```csharp ```csharp
connection.Execute(@" connection.Execute(@"
set nocount on set nocount on
create table #t(i int) create table #t(i int)
set nocount off set nocount off
insert #t insert #t
select @a a union all select @b select @a a union all select @b
set nocount on set nocount on
drop table #t", new {a=1, b=2 }) drop table #t", new {a=1, b=2 })
.IsEqualTo(2); .IsEqualTo(2);
``` ```
Execute a Command multiple times Execute a Command multiple times
-------------------------------- --------------------------------
The same signature also allows you to conveniently and efficiently execute a command multiple times (for example to bulk-load data) The same signature also allows you to conveniently and efficiently execute a command multiple times (for example to bulk-load data)
Example usage: Example usage:
```csharp ```csharp
connection.Execute(@"insert MyTable(colA, colB) values (@a, @b)", connection.Execute(@"insert MyTable(colA, colB) values (@a, @b)",
new[] { new { a=1, b=1 }, new { a=2, b=2 }, new { a=3, b=3 } } new[] { new { a=1, b=1 }, new { a=2, b=2 }, new { a=3, b=3 } }
).IsEqualTo(3); // 3 rows inserted: "1,1", "2,2" and "3,3" ).IsEqualTo(3); // 3 rows inserted: "1,1", "2,2" and "3,3"
``` ```
This works for any parameter that implements IEnumerable<T> for some T. This works for any parameter that implements IEnumerable<T> for some T.
Performance Performance
----------- -----------
A key feature of Dapper is performance. The following metrics show how long it takes to execute 500 SELECT statements against a DB and map the data returned to objects. A key feature of Dapper is performance. The following metrics show how long it takes to execute 500 SELECT statements against a DB and map the data returned to objects.
The performance tests are broken in to 3 lists: The performance tests are broken in to 3 lists:
- POCO serialization for frameworks that support pulling static typed objects from the DB. Using raw SQL. - POCO serialization for frameworks that support pulling static typed objects from the DB. Using raw SQL.
- Dynamic serialization for frameworks that support returning dynamic lists of objects. - Dynamic serialization for frameworks that support returning dynamic lists of objects.
- Typical framework usage. Often typical framework usage differs from the optimal usage performance wise. Often it will not involve writing SQL. - Typical framework usage. Often typical framework usage differs from the optimal usage performance wise. Often it will not involve writing SQL.
### Performance of SELECT mapping over 500 iterations - POCO serialization ### Performance of SELECT mapping over 500 iterations - POCO serialization
<table> <table>
<tr> <tr>
<th>Method</th> <th>Method</th>
<th>Duration</th> <th>Duration</th>
<th>Remarks</th> <th>Remarks</th>
</tr> </tr>
<tr> <tr>
<td>Hand coded (using a <code>SqlDataReader</code>)</td> <td>Hand coded (using a <code>SqlDataReader</code>)</td>
<td>47ms</td> <td>47ms</td>
<td rowspan="9"><a href="http://www.toptensoftware.com/Articles/94/PetaPoco-More-Speed">Can be faster</a></td> <td rowspan="9"><a href="http://www.toptensoftware.com/Articles/94/PetaPoco-More-Speed">Can be faster</a></td>
</tr> </tr>
<tr> <tr>
<td>Dapper <code>ExecuteMapperQuery<Post></code></td> <td>Dapper <code>ExecuteMapperQuery<Post></code></td>
<td>49ms</td> <td>49ms</td>
</tr> </tr>
<tr> <tr>
<td><a href="https://github.com/ServiceStack/ServiceStack.OrmLite">ServiceStack.OrmLite</a> (QueryById)</td> <td><a href="https://github.com/ServiceStack/ServiceStack.OrmLite">ServiceStack.OrmLite</a> (QueryById)</td>
<td>50ms</td> <td>50ms</td>
</tr> </tr>
<tr> <tr>
<td><a href="http://www.toptensoftware.com/petapoco/">PetaPoco</a></td> <td><a href="http://www.toptensoftware.com/petapoco/">PetaPoco</a></td>
<td>52ms</td> <td>52ms</td>
</tr> </tr>
<tr> <tr>
<td>BLToolkit</td> <td>BLToolkit</td>
<td>80ms</td> <td>80ms</td>
</tr> </tr>
<tr> <tr>
<td>SubSonic CodingHorror</td> <td>SubSonic CodingHorror</td>
<td>107ms</td> <td>107ms</td>
</tr> </tr>
<tr> <tr>
<td>NHibernate SQL</td> <td>NHibernate SQL</td>
<td>104ms</td> <td>104ms</td>
</tr> </tr>
<tr> <tr>
<td>Linq 2 SQL <code>ExecuteQuery</code></td> <td>Linq 2 SQL <code>ExecuteQuery</code></td>
<td>181ms</td> <td>181ms</td>
</tr> </tr>
<tr> <tr>
<td>Entity framework <code>ExecuteStoreQuery</code></td> <td>Entity framework <code>ExecuteStoreQuery</code></td>
<td>631ms</td> <td>631ms</td>
</tr> </tr>
</table> </table>
### Performance of SELECT mapping over 500 iterations - dynamic serialization ### Performance of SELECT mapping over 500 iterations - dynamic serialization
<table> <table>
<tr> <tr>
<th>Method</th> <th>Method</th>
<th>Duration</th> <th>Duration</th>
<th>Remarks</th> <th>Remarks</th>
</tr> </tr>
<tr> <tr>
<td>Dapper <code>ExecuteMapperQuery</code> (dynamic)</td> <td>Dapper <code>ExecuteMapperQuery</code> (dynamic)</td>
<td>48ms</td> <td>48ms</td>
<td rowspan="3">&nbsp;</td> <td rowspan="3">&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td><a href="http://blog.wekeroad.com/helpy-stuff/and-i-shall-call-it-massive">Massive</a></td> <td><a href="http://blog.wekeroad.com/helpy-stuff/and-i-shall-call-it-massive">Massive</a></td>
<td>52ms</td> <td>52ms</td>
</tr> </tr>
<tr> <tr>
<td><a href="https://github.com/markrendle/Simple.Data">Simple.Data</a></td> <td><a href="https://github.com/markrendle/Simple.Data">Simple.Data</a></td>
<td>95ms</td> <td>95ms</td>
</tr> </tr>
</table> </table>
### Performance of SELECT mapping over 500 iterations - typical usage ### Performance of SELECT mapping over 500 iterations - typical usage
<table> <table>
<tr> <tr>
<th>Method</th> <th>Method</th>
<th>Duration</th> <th>Duration</th>
<th>Remarks</th> <th>Remarks</th>
</tr> </tr>
<tr> <tr>
<td>Linq 2 SQL CompiledQuery</td> <td>Linq 2 SQL CompiledQuery</td>
<td>81ms</td> <td>81ms</td>
<td>Not super typical involves complex code</td> <td>Not super typical involves complex code</td>
</tr> </tr>
<tr> <tr>
<td>NHibernate HQL</td> <td>NHibernate HQL</td>
<td>118ms</td> <td>118ms</td>
<td>&nbsp;</td> <td>&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td>Linq 2 SQL</td> <td>Linq 2 SQL</td>
<td>559ms</td> <td>559ms</td>
<td>&nbsp;</td> <td>&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td>Entity framework</td> <td>Entity framework</td>
<td>859ms</td> <td>859ms</td>
<td>&nbsp;</td> <td>&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td>SubSonic ActiveRecord.SingleOrDefault</td> <td>SubSonic ActiveRecord.SingleOrDefault</td>
<td>3619ms</td> <td>3619ms</td>
<td>&nbsp;</td> <td>&nbsp;</td>
</tr> </tr>
</table> </table>
Performance benchmarks are available [here](https://github.com/SamSaffron/dapper-dot-net/blob/master/Tests/PerformanceTests.cs) Performance benchmarks are available [here](https://github.com/SamSaffron/dapper-dot-net/blob/master/Tests/PerformanceTests.cs)
Feel free to submit patches that include other ORMs - when running benchmarks, be sure to compile in Release and not attach a debugger (ctrl F5) Feel free to submit patches that include other ORMs - when running benchmarks, be sure to compile in Release and not attach a debugger (ctrl F5)
Parameterized queries Parameterized queries
--------------------- ---------------------
Parameters are passed in as anonymous classes. This allow you to name your parameters easily and gives you the ability to simply cut-and-paste SQL snippets and run them in Query analyzer. Parameters are passed in as anonymous classes. This allow you to name your parameters easily and gives you the ability to simply cut-and-paste SQL snippets and run them in Query analyzer.
```csharp ```csharp
new {A = 1, B = "b"} // A will be mapped to the param @A, B to the param @B new {A = 1, B = "b"} // A will be mapped to the param @A, B to the param @B
``` ```
List Support List Support
------------ ------------
Dapper allow you to pass in IEnumerable<int> and will automatically parameterize your query. Dapper allow you to pass in IEnumerable<int> and will automatically parameterize your query.
For example: For example:
```csharp ```csharp
connection.Query<int>("select * from (select 1 as Id union all select 2 union all select 3) as X where Id in @Ids", new { Ids = new int[] { 1, 2, 3 }); connection.Query<int>("select * from (select 1 as Id union all select 2 union all select 3) as X where Id in @Ids", new { Ids = new int[] { 1, 2, 3 });
``` ```
Will be translated to: Will be translated to:
```csharp ```csharp
select * from (select 1 as Id union all select 2 union all select 3) as X where Id in (@Ids1, @Ids2, @Ids3)" // @Ids1 = 1 , @Ids2 = 2 , @Ids2 = 3 select * from (select 1 as Id union all select 2 union all select 3) as X where Id in (@Ids1, @Ids2, @Ids3)" // @Ids1 = 1 , @Ids2 = 2 , @Ids2 = 3
``` ```
Buffered vs Unbuffered readers Buffered vs Unbuffered readers
--------------------- ---------------------
Dapper's default behavior is to execute your sql and buffer the entire reader on return. This is ideal in most cases as it minimizes shared locks in the db and cuts down on db network time. Dapper's default behavior is to execute your sql and buffer the entire reader on return. This is ideal in most cases as it minimizes shared locks in the db and cuts down on db network time.
However when executing huge queries you may need to minimize memory footprint and only load objects as needed. To do so pass, buffered: false into the Query method. However when executing huge queries you may need to minimize memory footprint and only load objects as needed. To do so pass, buffered: false into the Query method.
Multi Mapping Multi Mapping
--------------------- ---------------------
Dapper allows you to map a single row to multiple objects. This is a key feature if you want to avoid extraneous querying and eager load associations. Dapper allows you to map a single row to multiple objects. This is a key feature if you want to avoid extraneous querying and eager load associations.
Example: Example:
```csharp ```csharp
var sql = var sql =
@"select * from #Posts p @"select * from #Posts p
left join #Users u on u.Id = p.OwnerId left join #Users u on u.Id = p.OwnerId
Order by p.Id"; Order by p.Id";
var data = connection.Query<Post, User, Post>(sql, (post, user) => { post.Owner = user; return post;}); var data = connection.Query<Post, User, Post>(sql, (post, user) => { post.Owner = user; return post;});
var post = data.First(); var post = data.First();
post.Content.IsEqualTo("Sams Post1"); post.Content.IsEqualTo("Sams Post1");
post.Id.IsEqualTo(1); post.Id.IsEqualTo(1);
post.Owner.Name.IsEqualTo("Sam"); post.Owner.Name.IsEqualTo("Sam");
post.Owner.Id.IsEqualTo(99); post.Owner.Id.IsEqualTo(99);
``` ```
**important note** Dapper assumes your Id columns are named "Id" or "id", if your primary key is different or you would like to split the wide row at point other than "Id", use the optional 'splitOn' parameter. **important note** Dapper assumes your Id columns are named "Id" or "id", if your primary key is different or you would like to split the wide row at point other than "Id", use the optional 'splitOn' parameter.
Multiple Results Multiple Results
--------------------- ---------------------
Dapper allows you to process multiple result grids in a single query. Dapper allows you to process multiple result grids in a single query.
Example: Example:
```csharp ```csharp
var sql = var sql =
@" @"
select * from Customers where CustomerId = @id select * from Customers where CustomerId = @id
select * from Orders where CustomerId = @id select * from Orders where CustomerId = @id
select * from Returns where CustomerId = @id"; select * from Returns where CustomerId = @id";
using (var multi = connection.QueryMultiple(sql, new {id=selectedId})) using (var multi = connection.QueryMultiple(sql, new {id=selectedId}))
{ {
var customer = multi.Read<Customer>().Single(); var customer = multi.Read<Customer>().Single();
var orders = multi.Read<Order>().ToList(); var orders = multi.Read<Order>().ToList();
var returns = multi.Read<Return>().ToList(); var returns = multi.Read<Return>().ToList();
... ...
} }
``` ```
Stored Procedures Stored Procedures
--------------------- ---------------------
Dapper supports fully stored procs: Dapper supports fully stored procs:
```csharp ```csharp
var user = cnn.Query<User>("spGetUser", new {Id = 1}, var user = cnn.Query<User>("spGetUser", new {Id = 1},
commandType: CommandType.StoredProcedure).First();}}} commandType: CommandType.StoredProcedure).First();}}}
``` ```
If you want something more fancy, you can do: If you want something more fancy, you can do:
```csharp ```csharp
var p = new DynamicParameters(); var p = new DynamicParameters();
p.Add("@a", 11); p.Add("@a", 11);
p.Add("@b", dbType: DbType.Int32, direction: ParameterDirection.Output); p.Add("@b", dbType: DbType.Int32, direction: ParameterDirection.Output);
p.Add("@c", dbType: DbType.Int32, direction: ParameterDirection.ReturnValue); p.Add("@c", dbType: DbType.Int32, direction: ParameterDirection.ReturnValue);
cnn.Execute("spMagicProc", p, commandType: commandType.StoredProcedure); cnn.Execute("spMagicProc", p, commandType: commandType.StoredProcedure);
int b = p.Get<int>("@b"); int b = p.Get<int>("@b");
int c = p.Get<int>("@c"); int c = p.Get<int>("@c");
``` ```
Ansi Strings and varchar Ansi Strings and varchar
--------------------- ---------------------
Dapper supports varchar params, if you are executing a where clause on a varchar column using a param be sure to pass it in this way: Dapper supports varchar params, if you are executing a where clause on a varchar column using a param be sure to pass it in this way:
```csharp ```csharp
Query<Thing>("select * from Thing where Name = @Name", new {Name = new DbString { Value = "abcde", IsFixedLength = true, Length = 10, IsAnsi = true }); Query<Thing>("select * from Thing where Name = @Name", new {Name = new DbString { Value = "abcde", IsFixedLength = true, Length = 10, IsAnsi = true });
``` ```
On Sql Server it is crucial to use the unicode when querying unicode and ansi when querying non unicode. On Sql Server it is crucial to use the unicode when querying unicode and ansi when querying non unicode.
Limitations and caveats Limitations and caveats
--------------------- ---------------------
Dapper caches information about every query it runs, this allow it to materialize objects quickly and process parameters quickly. The current implementation caches this information in a ConcurrentDictionary object. The objects it stores are never flushed. If you are generating SQL strings on the fly without using parameters it is possible you will hit memory issues. We may convert the dictionaries to an LRU Cache. Dapper caches information about every query it runs, this allow it to materialize objects quickly and process parameters quickly. The current implementation caches this information in a ConcurrentDictionary object. The objects it stores are never flushed. If you are generating SQL strings on the fly without using parameters it is possible you will hit memory issues. We may convert the dictionaries to an LRU Cache.
Dapper's simplicity means that many feature that ORMs ship with are stripped out, there is no identity map, there are no helpers for update / select and so on. Dapper's simplicity means that many feature that ORMs ship with are stripped out, there is no identity map, there are no helpers for update / select and so on.
Dapper does not manage your connection's lifecycle, it assumes the connection it gets is open AND has no existing datareaders enumerating (unless MARS is enabled) Dapper does not manage your connection's lifecycle, it assumes the connection it gets is open AND has no existing datareaders enumerating (unless MARS is enabled)
Will dapper work with my db provider? Will dapper work with my db provider?
--------------------- ---------------------
Dapper has no DB specific implementation details, it works across all .net ado providers including sqlite, sqlce, firebird, oracle, MySQL and SQL Server Dapper has no DB specific implementation details, it works across all .net ado providers including sqlite, sqlce, firebird, oracle, MySQL and SQL Server
Do you have a comprehensive list of examples? Do you have a comprehensive list of examples?
--------------------- ---------------------
Dapper has a comprehensive test suite in the [test project](https://github.com/SamSaffron/dapper-dot-net/blob/master/Tests/Tests.cs) Dapper has a comprehensive test suite in the [test project](https://github.com/SamSaffron/dapper-dot-net/blob/master/Tests/Tests.cs)
Who is using this? Who is using this?
--------------------- ---------------------
Dapper is in production use at: Dapper is in production use at:
[Stack Overflow](http://stackoverflow.com/), [xpfest.com](http://www.xapfest.com/), [helpdesk](http://www.jitbit.com/helpdesk-software/) [Stack Overflow](http://stackoverflow.com/), [xpfest.com](http://www.xapfest.com/), [helpdesk](http://www.jitbit.com/helpdesk-software/)
(if you would like to be listed here let me know) (if you would like to be listed here let me know)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment