本文整理汇总了C#中CavemanTools.Testing.BenchmarksContainer类的典型用法代码示例。如果您正苦于以下问题:C# BenchmarksContainer类的具体用法?C# BenchmarksContainer怎么用?C# BenchmarksContainer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BenchmarksContainer类属于CavemanTools.Testing命名空间,在下文中一共展示了BenchmarksContainer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FetchSingleEntity
public override void FetchSingleEntity(BenchmarksContainer bc)
{
bc.Add(d=>
{
_cnx.Query<sfPosts>("select * from sfPosts where [email protected]", new {id = 5},commandType:CommandType.Text).FirstOrDefault();
},Name);
}
示例2: QueryTop10Dynamic
public override void QueryTop10Dynamic(BenchmarksContainer bc)
{
bc.Add(id =>
{
_db.sfPosts.FindAll(_db.sfPosts.Id>5).ToArray();
}, "SimpleData");
}
示例3: MultiPocoMapping
public override void MultiPocoMapping(BenchmarksContainer bc)
{
bc.Add(id =>
{
throw new NotSupportedException();
}, "SimpleData");
}
示例4: MultiPocoMapping
public override void MultiPocoMapping(BenchmarksContainer bc)
{
bc.Add(d =>
{
_cnx.QuerySql<PostViewModel, IdName>("select *, Id, title as Name from sfposts p where [email protected] order by p.id", new { id = 5 });
}, Name);
}
示例5: FetchSingleDynamicEntity
public override void FetchSingleDynamicEntity(BenchmarksContainer bc)
{
bc.Add(id =>
{
_db.sfPosts.Get(5);
}, "SimpleData dynamic");
}
示例6: QueryTop10
public override void QueryTop10(BenchmarksContainer bc)
{
bc.Add(d =>
{
_cnx.Query<sfPosts>("select top 10 * from sfPOsts where id>@id", new { id = 5 });
}, Name);
}
示例7: QueryTop10Dynamic
public override void QueryTop10Dynamic(BenchmarksContainer bc)
{
bc.Add(d =>
{
_cnx.QuerySql("select top 10 * from sfPosts where id>@id", new { id = 5 }).ToArray();
}, Name);
}
示例8: FetchSingleDynamicEntity
public override void FetchSingleDynamicEntity(BenchmarksContainer bc)
{
bc.Add(i =>
{
_db.Single(5);
}, "Massive");
}
示例9: QueryTop10
public override void QueryTop10(BenchmarksContainer bc)
{
bc.Add(i =>
{
throw new NotSupportedException("not explicit type support");
}, "Massive");
}
示例10: MultiPocoMapping
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 [email protected] order by p.id", 5).FirstOrDefault();
}, "PetaPoco");
}
示例11: MultiPocoMapping
public override void MultiPocoMapping(BenchmarksContainer bc)
{
bc.Add(id =>
{
_db.IgnoreIfAutoMapFails.Sql("select *,id as Author_Id,title as Author_Name from sfposts where [email protected] order by id", 5).Query<PostViewModel>();
}, Name);
}
示例12: QueryTop10Dynamic
public override void QueryTop10Dynamic(BenchmarksContainer bc)
{
bc.Add(id =>
{
_db.Query<dynamic>("select top 10 * from sfPosts where id>@0", 5).ToArray();
}, "PetaPoco dynamic");
}
示例13: FetchSingleEntity
public override void FetchSingleEntity(BenchmarksContainer bc)
{
bc.Add(id=>
{
_db.Single<sfPosts>("select * from sfPosts where [email protected]", 5);
},"PetaPoco entity");
}
示例14: QueryTop10
public override void QueryTop10(BenchmarksContainer bc)
{
bc.Add(d =>
{
_cnx.Query<sfPosts>("select top 10 * from sfPosts where id>@id", new { id = 5 }, commandType: CommandType.Text).ToArray();
}, Name);
}
示例15: MultiPocoMapping
public override void MultiPocoMapping(BenchmarksContainer bc)
{
bc.Add(id =>
{
_db.QuerySingle<PostViewModel>("select *,id as Author_Id,title as Author_Name from sfposts where [email protected] order by id",5);
}, "SqlFu");
}