public override void QueryTop10(BenchmarksContainer bc) { bc.Add(id => { throw new NotSupportedException(); }, "SimpleData"); }
public override void QueryTop10Dynamic(BenchmarksContainer bc) { bc.Add(id => { _db.sfPosts.FindAll(_db.sfPosts.Id > 5).ToArray(); }, "SimpleData"); }
public override void FetchSingleDynamicEntity(BenchmarksContainer bc) { bc.Add(id => { _db.sfPosts.Get(5); }, "SimpleData dynamic"); }
public override void FetchSingleEntity(BenchmarksContainer bc) { bc.Add(id => { throw new NotSupportedException(); }, "SimpleData"); }
public override void ExecuteScalar(BenchmarksContainer bc) { bc.Add(d => { _cnx.GetScalar <string>("select title from sfPOsts where id={0}", 5); }, Name); }
public override void PagedQuery_Skip0_Take10(BenchmarksContainer bc) { bc.Add(id => { _db.sfPosts.FindAll(_db.sfPosts.Id > 5).Skip(0).Take(10).ToArray(); }, "SimpleData"); }
public override void FetchSingleEntity(BenchmarksContainer bc) { bc.Add(d => { _cnx.GetById <sfPosts>(5); }, Name); }
public override void QueryTop10(BenchmarksContainer bc) { bc.Add(id => { _db.Query <sfPosts>("select top 10 * from sfposts where id>@0", 5).ToArray(); }, "SqlFu"); }
public override void ExecuteScalar(BenchmarksContainer bc) { bc.Add(id => { _cnx.Query <string>("select title from sfPosts where id=@id", new { id = 3 }).Single(); }, "Dapper scalar"); }
public override void FetchSingleDynamicEntity(BenchmarksContainer bc) { bc.Add(d => { _cnx.QuerySingle <dynamic>("select * from sfPOsts where id=@id", new{ id = 5 }); }, Name); }
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"); }
public override void Updates(BenchmarksContainer bc) { bc.Add(id => { _db.Update("sfPosts", "id", new { Id = 3, Title = "updated" }); }, "PetaPoco"); }
public override void QueryTop10Dynamic(BenchmarksContainer bc) { bc.Add(id => { _db.Query <dynamic>("select top 10 * from sfPosts where id>@0", 5).ToArray(); }, "PetaPoco dynamic"); }
public override void FetchSingleEntity(BenchmarksContainer bc) { bc.Add(id => { _db.Single <sfPosts>("select * from sfPosts where id=@0", 5); }, "PetaPoco entity"); }
public override void Updates(BenchmarksContainer bc) { bc.Add(id => { _db.sfPosts.UpdateById(new { Id = 3, Title = "updated" }); }, "SimpleData"); }
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"); }
public override void QueryTop10Dynamic(BenchmarksContainer bc) { bc.Add(d => { _cnx.Query <dynamic>("select top 10 * from sfPOsts where id>@id", new { id = 5 }); }, Name); }
public override void PagedQuery_Skip0_Take10(BenchmarksContainer bc) { bc.Add(id => { _db.PagedQuery <sfPosts>(0, 10, "select * from sfposts where id>@0", 5); }, "SqlFu"); }
public override void QueryTop10Dynamic(BenchmarksContainer bc) { bc.Add(id => { _db.Query <dynamic>("select top 10 * from sfposts where id>@0", 5); }, "SqlFu"); }
public override void ExecuteScalar(BenchmarksContainer bc) { bc.Add(d => { _cnx.QueryScalar <string>("select title from sfPOsts where id=@id", new { id = 5 }); }, Name); }
public override void Updates(BenchmarksContainer bc) { bc.Add(id => { _db.Update <sfPosts>(new{ Id = 3, Title = "updated" }); }, "SqlFu"); }
public override void FetchSingleDynamicEntity(BenchmarksContainer bc) { bc.Add(id => { _db.QuerySingle <dynamic>("select * from sfPosts where id=@0", 5); }, "SqlFu dynamic"); }
public override void PagedQuery_Skip0_Take10(BenchmarksContainer bc) { bc.Add(id => { throw new NotSupportedException("No implicit pagination support"); }, "Dapper "); }
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 "); }
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"); }
public override void MultiPocoMapping(BenchmarksContainer bc) { bc.Add(id => { throw new NotSupportedException(); }, "SimpleData"); }
public override void PagedQuery_Skip0_Take10(BenchmarksContainer bc) { bc.Add(d => { _cnx.QueryScalar <int>("select count(*) from sfPosts where id >@id", new{ id = 5 }); _cnx.Select <sfPosts>(s => s.Where(p => p.Id > 5).Limit(0, 10)); }, Name); }
public override void ExecuteScalar(BenchmarksContainer bc) { bc.Add(id => { //_db.sfPosts.FindById(5).Select(_db["sfPosts"]["Title"]).FirstOrDefault().ToScalar<string>(); _db.sfPosts.Get(5).ToScalar <int>(); }, "SimpleData scalar"); }
public override void Inserts(BenchmarksContainer bc) { var p = sfPosts.Create(); bc.Add(d => { throw new NotSupportedException("Couldn't figure how to insert pocos with auto increment id"); }, "massive"); }
public override void Inserts(BenchmarksContainer bc) { var p = sfPosts.Create(); bc.Add(id => { _db.Insert(p); }, "SqlFu"); }