Skip to content

Commit

Permalink
Fixed test issue in Simple.Data performance test (#723)
Browse files Browse the repository at this point in the history
* Added fix for Simple.Data tast

Due to the missing .FirstOrDefault() in Simple.Data test, performance
numbers for Simple.Data were too high (better than hand coded data
reader). Added FirstOrDefault() to actually fetch the data.
  • Loading branch information
jovanpop-msft authored and NickCraver committed Mar 14, 2017
1 parent b057017 commit 1ab1069
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dapper.Tests/PerformanceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ public void Run(int iterations)
Try(() =>
{
var sdb = Simple.Data.Database.OpenConnection(TestSuite.ConnectionString);
tests.Add(id => sdb.Posts.FindById(id), "Simple.Data");
tests.Add(id => sdb.Posts.FindById(id).FirstOrDefault(), "Simple.Data");
}, "Simple.Data");
#endif

Expand Down

0 comments on commit 1ab1069

Please sign in to comment.