Esempio n. 1
0
 public override void MultiPocoMapping(BenchmarksContainer bc)
 {
     bc.Add(id =>
     {
         throw new NotSupportedException();
     }, "SimpleData");
 }
Esempio n. 2
0
 public override void QueryTop10Dynamic(BenchmarksContainer bc)
 {
     bc.Add(i =>
     {
         Enumerable.ToArray(_db.Paged(pageSize: 10).Items);
     }, "Massive");
 }
Esempio n. 3
0
 public override void MultiPocoMapping(BenchmarksContainer bc)
 {
     bc.Add(d =>
     {
         throw new NotSupportedException();
     }, "Massive");
 }
Esempio n. 4
0
 public override void Updates(BenchmarksContainer bc)
 {
     bc.Add(id =>
     {
         throw new NotSupportedException();
     }, Name);
 }
Esempio n. 5
0
 public override void FetchSingleDynamicEntity(BenchmarksContainer bc)
 {
     bc.Add(i =>
     {
         _db.Single(5);
     }, "Massive");
 }
Esempio n. 6
0
 public override void FetchSingleDynamicEntity(BenchmarksContainer bc)
 {
     bc.Add(d =>
     {
         _cnx.QuerySql("select * from sfPosts where id=@id", new { id = 5 }).FirstOrDefault();
     }, Name);
 }
Esempio n. 7
0
 public override void ExecuteScalar(BenchmarksContainer bc)
 {
     bc.Add(d =>
     {
         _cnx.ExecuteScalarSql <string>("select title from sfPosts where id=@id", new { id = 5 });
     }, Name);
 }
Esempio n. 8
0
 public override void FetchSingleEntity(BenchmarksContainer bc)
 {
     bc.Add(d =>
     {
         _cnx.GetById <sfPosts>(5);
     }, Name);
 }
Esempio n. 9
0
 public override void FetchSingleDynamicEntity(BenchmarksContainer bc)
 {
     bc.Add(d =>
     {
         _cnx.QuerySingle <dynamic>("select * from sfPOsts where id=@id", new{ id = 5 });
     }, Name);
 }
Esempio n. 10
0
 public override void MultiPocoMapping(BenchmarksContainer bc)
 {
     bc.Add(id =>
     {
         _db.Query <PostViewModel, IdName>("select p.*,p.Id ,p.title as Name from sfposts p where p.id=@0 order by p.id", 5).FirstOrDefault();
     }, "PetaPoco");
 }
Esempio n. 11
0
 public override void Updates(BenchmarksContainer bc)
 {
     bc.Add(id =>
     {
         _db.Update("sfPosts", "id", new { Id = 3, Title = "updated" });
     }, "PetaPoco");
 }
Esempio n. 12
0
 public override void QueryTop10Dynamic(BenchmarksContainer bc)
 {
     bc.Add(id =>
     {
         _db.Query <dynamic>("select top 10 * from sfPosts where id>@0", 5).ToArray();
     }, "PetaPoco dynamic");
 }
Esempio n. 13
0
 public override void FetchSingleEntity(BenchmarksContainer bc)
 {
     bc.Add(id =>
     {
         _db.Single <sfPosts>("select * from sfPosts where id=@0", 5);
     }, "PetaPoco entity");
 }
Esempio n. 14
0
 public override void Updates(BenchmarksContainer bc)
 {
     bc.Add(id =>
     {
         _db.sfPosts.UpdateById(new { Id = 3, Title = "updated" });
     }, "SimpleData");
 }
Esempio n. 15
0
 public override void PagedQuery_Skip0_Take10(BenchmarksContainer bc)
 {
     bc.Add(id =>
     {
         _db.PagedQuery <sfPosts>(0, 10, "select * from sfposts where id>@0", 5);
     }, "SqlFu");
 }
Esempio n. 16
0
 public override void QueryTop10(BenchmarksContainer bc)
 {
     bc.Add(d =>
     {
         _cnx.Query <sfPosts>("select top 10 * from sfPOsts where id>@id", new { id = 5 });
     }, Name);
 }
Esempio n. 17
0
 public override void MultiPocoMapping(BenchmarksContainer bc)
 {
     bc.Add(id =>
     {
         _db.QuerySingle <PostViewModel>("select *,id as Author_Id,title as Author_Name from sfposts where id=@0 order by id", 5);
     }, "SqlFu");
 }
Esempio n. 18
0
 public override void FetchSingleDynamicEntity(BenchmarksContainer bc)
 {
     bc.Add(id =>
     {
         _cnx.Query <dynamic>("select Id,AuthorId,Title,CreatedOn,'Post' as Type,TopicId,IsActive from sfPosts where id=@id", new { id = 3 }).FirstOrDefault();
     }, "Dapper query entitty dynamic");
 }
Esempio n. 19
0
 public override void QueryTop10Dynamic(BenchmarksContainer bc)
 {
     bc.Add(d =>
     {
         _cnx.QuerySql("select top 10 * from sfPosts where id>@id", new { id = 5 }).ToArray();
     }, Name);
 }
Esempio n. 20
0
 public override void QueryTop10Dynamic(BenchmarksContainer bc)
 {
     bc.Add(id =>
     {
         _cnx.Query <dynamic>("select top 10 Id,AuthorId,Title,CreatedOn,'Post' as Type,TopicId,IsActive from sfPosts where id>@id", new { id = 3 }).ToArray();
     }, "Dapper ");
 }
Esempio n. 21
0
 public override void MultiPocoMapping(BenchmarksContainer bc)
 {
     bc.Add(d =>
     {
         _cnx.QuerySql <PostViewModel, IdName>("select *, Id, title as Name from sfposts p where id=@id order by p.id", new { id = 5 });
     }, Name);
 }
Esempio n. 22
0
 public override void PagedQuery_Skip0_Take10(BenchmarksContainer bc)
 {
     bc.Add(id =>
     {
         throw new NotSupportedException("No implicit pagination support");
     }, "Dapper ");
 }
Esempio n. 23
0
 public override void FetchSingleEntity(BenchmarksContainer bc)
 {
     bc.Add(i =>
     {
         throw new NotSupportedException("not explicit type support");
     }, "Massive");
 }
Esempio n. 24
0
 public override void Updates(BenchmarksContainer bc)
 {
     bc.Add(id =>
     {
         _db.Update <sfPosts>(new{ Id = 3, Title = "updated" });
     }, "SqlFu");
 }
Esempio n. 25
0
 public override void QueryTop10(BenchmarksContainer bc)
 {
     bc.Add(i =>
     {
         throw new NotSupportedException("not explicit type support");
     }, "Massive");
 }
Esempio n. 26
0
 public override void FetchSingleDynamicEntity(BenchmarksContainer bc)
 {
     bc.Add(id =>
     {
         _db.QuerySingle <dynamic>("select * from sfPosts where id=@0", 5);
     }, "SqlFu dynamic");
 }
Esempio n. 27
0
 public override void ExecuteScalar(BenchmarksContainer bc)
 {
     bc.Add(i =>
     {
         _db.Scalar("select title from sfPosts where id=@0", 5);
     }, "Massive");
 }
Esempio n. 28
0
 public override void QueryTop10Dynamic(BenchmarksContainer bc)
 {
     bc.Add(id =>
     {
         _db.Query <dynamic>("select top 10 * from sfposts where id>@0", 5);
     }, "SqlFu");
 }
Esempio n. 29
0
 public override void Updates(BenchmarksContainer bc)
 {
     bc.Add(d =>
     {
         _db.Update(new { title = "Updated" }, 5);
     }, "massive");
 }
Esempio n. 30
0
 public override void PagedQuery_Skip0_Take10(BenchmarksContainer bc)
 {
     bc.Add(id =>
     {
         _db.sfPosts.FindAll(_db.sfPosts.Id > 5).Skip(0).Take(10).ToArray();
     }, "SimpleData");
 }