当前位置: 首页>>代码示例>>C#>>正文


C# BenchmarksContainer.Add方法代码示例

本文整理汇总了C#中CavemanTools.Testing.BenchmarksContainer.Add方法的典型用法代码示例。如果您正苦于以下问题:C# BenchmarksContainer.Add方法的具体用法?C# BenchmarksContainer.Add怎么用?C# BenchmarksContainer.Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CavemanTools.Testing.BenchmarksContainer的用法示例。


在下文中一共展示了BenchmarksContainer.Add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: FetchSingleEntity

 public override void FetchSingleEntity(BenchmarksContainer bc)
 {
     bc.Add(id=>
                {
                    _db.Get<sfPosts>(5);
                },"SqlFu Get");
     bc.Add(id=>
                {
                    _db.QuerySingle<sfPosts>("select * from sfPosts where [email protected]",5);
                },"SqlFu FirstOrDefault");
 }
开发者ID:eugman,项目名称:SqlFu,代码行数:11,代码来源:SqlFuTests.cs

示例2: FetchSingleEntity

        public override void FetchSingleEntity(BenchmarksContainer bc)
        {
            bc.Add(id =>
                {
                    _cnx.Get<sfPosts>(3);
                    
                  }, "Dapper get entity");

            bc.Add(id =>
            {
                _cnx.Query<sfPosts>("select Id,AuthorId,Title,CreatedOn,'Post' as Type,TopicId,IsActive from sfPosts where [email protected]", new { id = 3 }).FirstOrDefault();

            }, "Dapper query entity");
        }
开发者ID:eugman,项目名称:SqlFu,代码行数:14,代码来源:DapperTests.cs

示例3: FetchSingleDynamicEntity

 public override void FetchSingleDynamicEntity(BenchmarksContainer bc)
 {
     bc.Add(id =>
     {
         _db.QuerySingle<dynamic>("select * from sfPosts where [email protected]", 5);
     }, "SqlFu dynamic");
 }
开发者ID:eugman,项目名称:SqlFu,代码行数:7,代码来源:SqlFuTests.cs

示例4: MultiPocoMapping

 public override void MultiPocoMapping(BenchmarksContainer bc)
 {
     bc.Add(d=>
                {
                    throw new NotSupportedException();
                },"Massive");
 }
开发者ID:eugman,项目名称:SqlFu,代码行数:7,代码来源:MssiveTests.cs

示例5: FetchSingleDynamicEntity

 public override void FetchSingleDynamicEntity(BenchmarksContainer bc)
 {
     bc.Add(d =>
     {
         _cnx.QuerySql("select * from sfPosts where [email protected]", new { id = 5 }).FirstOrDefault();
     }, Name);
 }
开发者ID:eugman,项目名称:SqlFu,代码行数:7,代码来源:InsightDbTests.cs

示例6: ExecuteScalar

 public override void ExecuteScalar(BenchmarksContainer bc)
 {
     bc.Add(d =>
     {
         _cnx.ExecuteScalarSql<string>("select title from sfPosts where [email protected]", new { id = 5 });
     }, Name);
 }
开发者ID:eugman,项目名称:SqlFu,代码行数:7,代码来源:InsightDbTests.cs

示例7: 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);
 }
开发者ID:gmav,项目名称:SqlFu,代码行数:7,代码来源:FluentDataTests.cs

示例8: FetchSingleEntity

 public override void FetchSingleEntity(BenchmarksContainer bc)
 {
     bc.Add(d=>
         {
             _cnx.GetById<sfPosts>(5);
         },Name);
 }
开发者ID:eugman,项目名称:SqlFu,代码行数:7,代码来源:ServiceStackTests.cs

示例9: 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");
 }
开发者ID:eugman,项目名称:SqlFu,代码行数:7,代码来源:PetaPocoTests.cs

示例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");
 }
开发者ID:eugman,项目名称:SqlFu,代码行数:7,代码来源:PetaPocoTests.cs

示例11: FetchSingleEntity

 public override void FetchSingleEntity(BenchmarksContainer bc)
 {
    bc.Add(id=>
               {
                   _db.Single<sfPosts>("select * from sfPosts where [email protected]", 5);
               },"PetaPoco entity");
 }
开发者ID:eugman,项目名称:SqlFu,代码行数:7,代码来源:PetaPocoTests.cs

示例12: MultiPocoMapping

 public override void MultiPocoMapping(BenchmarksContainer bc)
 {
     bc.Add(id =>
     {
         _db.FirstOrDefault<PostViewModel>("select *,id as Author_Id,title as Author_Name from sfposts where [email protected] order by id",5);
     }, "SqlFu");
 }
开发者ID:apacifico,项目名称:SqlFu,代码行数:7,代码来源:SqlFuTests.cs

示例13: 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);
 }
开发者ID:gmav,项目名称:SqlFu,代码行数:7,代码来源:InsightDbTests.cs

示例14: 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);
 }
开发者ID:gmav,项目名称:SqlFu,代码行数:7,代码来源:InsightDbTests.cs

示例15: FetchSingleDynamicEntity

 public override void FetchSingleDynamicEntity(BenchmarksContainer bc)
 {
     bc.Add(i =>
                {
                    _db.Single(5);
                }, "Massive");
 }
开发者ID:eugman,项目名称:SqlFu,代码行数:7,代码来源:MssiveTests.cs


注:本文中的CavemanTools.Testing.BenchmarksContainer.Add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。