ORM-Dapper+DapperExtensions 示例全代码

上传者: zbl131 | 上传时间: 2021-07-30 20:31:00 | 文件大小: 128KB | 文件类型: ZIP
HY.
根据博客园“咖啡不苦不舒服”的文章“搭建一套自己实用的.net架构(3)【ORM-Dapper+DapperExtensions】”整合、杜撰的一套完整可运行代码。原地址:http://www.cnblogs.com/hy59005271/p/4759623.html。 去掉了HY.Web,添加了HY.Web.ConsoleTest控制台程序,做了如下测试: var service = new DeployService(); //插入 service.Insert(entity); //查询所有 var allList = service.GetAll(); //多条件查询 var pgMain = new PredicateGroup { Operator = GroupOperator.Or, Predicates = new List() }; var pga = new PredicateGroup() { Operator = GroupOperator.And, Predicates = new List() }; pga.Predicates.Add(Predicates.Field(f => f.DeployCode, Operator.Eq, "100")); pga.Predicates.Add(Predicates.Field(f => f.ID, Operator.Ge, 47)); pga.Predicates.Add(Predicates.Field(f => f.ID, Operator.Le, 48)); pgMain.Predicates.Add(pga); var pgb = new PredicateGroup() { Operator = GroupOperator.And, Predicates = new List() }; pgb.Predicates.Add(Predicates.Field(f => f.DeployCode, Operator.Eq, "10000")); pgMain.Predicates.Add(pgb); var specialList = service.GetList(pgMain).ToList(); //分页查询 long allRowsCount = 0; var pageList = service.GetPageList(1, 2, out allRowsCount);

文件下载

资源详情

[{"title":"( 83 个子文件 128KB ) ORM-Dapper+DapperExtensions 示例全代码","children":[{"title":"HY.ORM","children":[{"title":"bin","children":[{"title":"Release","children":null,"spread":false},{"title":"Debug","children":null,"spread":false}],"spread":true},{"title":"DapperExtensions","children":[{"title":"DapperExtensions.cs <span style='color:#111;'> 12.97KB </span>","children":null,"spread":false},{"title":"GetMultipleResult.cs <span style='color:#111;'> 985B </span>","children":null,"spread":false},{"title":"Database.cs <span style='color:#111;'> 10.04KB </span>","children":null,"spread":false},{"title":"Mapper","children":[{"title":"ClassMapper.cs <span style='color:#111;'> 5.26KB </span>","children":null,"spread":false},{"title":"PluralizedAutoClassMapper.cs <span style='color:#111;'> 3.97KB </span>","children":null,"spread":false},{"title":"PropertyMap.cs <span style='color:#111;'> 4.42KB </span>","children":null,"spread":false},{"title":"AutoClassMapper.cs <span style='color:#111;'> 498B </span>","children":null,"spread":false}],"spread":true},{"title":"Predicates.cs <span style='color:#111;'> 14.58KB </span>","children":null,"spread":false},{"title":"Sql","children":[{"title":"SqlDialectBase.cs <span style='color:#111;'> 4.25KB </span>","children":null,"spread":false},{"title":"SqliteDialect.cs <span style='color:#111;'> 1.72KB </span>","children":null,"spread":false},{"title":"SqlCeDialect.cs <span style='color:#111;'> 2.01KB </span>","children":null,"spread":false},{"title":"PostgreSqlDialect.cs <span style='color:#111;'> 1.29KB </span>","children":null,"spread":false},{"title":"SqlServerDialect.cs <span style='color:#111;'> 5.09KB </span>","children":null,"spread":false},{"title":"OracleDialect.cs <span style='color:#111;'> 2.15KB </span>","children":null,"spread":false},{"title":"MySqlDialect.cs <span style='color:#111;'> 1.35KB </span>","children":null,"spread":false},{"title":"SqlGenerator.cs <span style='color:#111;'> 11.26KB </span>","children":null,"spread":false}],"spread":true},{"title":"DapperExtensionsConfiguration.cs <span style='color:#111;'> 3.82KB </span>","children":null,"spread":false},{"title":"GetMultiplePredicate.cs <span style='color:#111;'> 1.26KB </span>","children":null,"spread":false},{"title":"DapperImplementor.cs <span style='color:#111;'> 21.25KB </span>","children":null,"spread":false},{"title":"ReflectionHelper.cs <span style='color:#111;'> 3.96KB </span>","children":null,"spread":false}],"spread":true},{"title":"obj","children":[{"title":"Debug","children":[{"title":"DesignTimeResolveAssemblyReferencesInput.cache <span style='color:#111;'> 6.50KB </span>","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false},{"title":"HY.ORM.csproj.FileListAbsolute.txt <span style='color:#111;'> 593B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"RepositoryBase.cs <span style='color:#111;'> 5.58KB </span>","children":null,"spread":false},{"title":"HY.ORM.csproj <span style='color:#111;'> 4.14KB </span>","children":null,"spread":false},{"title":"IDataServiceRepository.cs <span style='color:#111;'> 1.48KB </span>","children":null,"spread":false},{"title":"Dapper","children":[{"title":"SqlMapper.cs <span style='color:#111;'> 141.84KB </span>","children":null,"spread":false}],"spread":true},{"title":"Class1.cs <span style='color:#111;'> 158B </span>","children":null,"spread":false},{"title":"IDataRepository.cs <span style='color:#111;'> 1.47KB </span>","children":null,"spread":false},{"title":"Properties","children":[{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.32KB </span>","children":null,"spread":false}],"spread":true},{"title":"HY.ORM.csproj.user <span style='color:#111;'> 228B </span>","children":null,"spread":false},{"title":"RepositoryServiceBase.cs <span style='color:#111;'> 7.82KB </span>","children":null,"spread":false}],"spread":false},{"title":"HY.DataAccess","children":[{"title":"HY.DataAccess.csproj <span style='color:#111;'> 3.09KB </span>","children":null,"spread":false},{"title":"bin","children":[{"title":"Release","children":null,"spread":false},{"title":"Debug","children":null,"spread":false}],"spread":true},{"title":"packages.config <span style='color:#111;'> 316B </span>","children":null,"spread":false},{"title":"MySqlDBHelper","children":[{"title":"MySqlAdaptor.cs <span style='color:#111;'> 14.34KB </span>","children":null,"spread":false},{"title":"MySqlHelper.cs <span style='color:#111;'> 20.50KB </span>","children":null,"spread":false}],"spread":true},{"title":"obj","children":[{"title":"Debug","children":[{"title":"DesignTimeResolveAssemblyReferencesInput.cache <span style='color:#111;'> 6.71KB </span>","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false},{"title":"HY.DataAccess.csproj.FileListAbsolute.txt <span style='color:#111;'> 467B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"DBSession.cs <span style='color:#111;'> 2.53KB </span>","children":null,"spread":false},{"title":"SqlConnectionFactory.cs <span style='color:#111;'> 1.34KB </span>","children":null,"spread":false},{"title":"IDBHelper.cs <span style='color:#111;'> 9.34KB </span>","children":null,"spread":false},{"title":"IDbSession.cs <span style='color:#111;'> 1.38KB </span>","children":null,"spread":false},{"title":"SqlDBHelper","children":[{"title":"SQLHelper.cs <span style='color:#111;'> 19.60KB </span>","children":null,"spread":false},{"title":"DBAdaptor.cs <span style='color:#111;'> 13.65KB </span>","children":null,"spread":false}],"spread":true},{"title":"OracleDBHelper","children":[{"title":"OracleHelper.cs <span style='color:#111;'> 18.03KB </span>","children":null,"spread":false},{"title":"OracleAdaptor.cs <span style='color:#111;'> 13.83KB </span>","children":null,"spread":false}],"spread":true},{"title":"app.config <span style='color:#111;'> 477B </span>","children":null,"spread":false},{"title":"PageHelper","children":[{"title":"PageHelper.cs <span style='color:#111;'> 3.27KB </span>","children":null,"spread":false}],"spread":true},{"title":"Properties","children":[{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.32KB </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"HY.All.sln <span style='color:#111;'> 3.86KB </span>","children":null,"spread":false},{"title":"HY.IService","children":[{"title":"bin","children":[{"title":"Release","children":null,"spread":false},{"title":"Debug","children":null,"spread":false}],"spread":true},{"title":"IDeployService.cs <span style='color:#111;'> 427B </span>","children":null,"spread":false},{"title":"HY.IService.csproj <span style='color:#111;'> 2.75KB </span>","children":null,"spread":false},{"title":"obj","children":[{"title":"Debug","children":[{"title":"HY.IService.csproj.FileListAbsolute.txt <span style='color:#111;'> 999B </span>","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferencesInput.cache <span style='color:#111;'> 6.49KB </span>","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Properties","children":[{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.33KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"HY.Web.Entity","children":[{"title":"HY.Web.Entity.csproj <span style='color:#111;'> 2.57KB </span>","children":null,"spread":false},{"title":"bin","children":[{"title":"Release","children":null,"spread":false},{"title":"Debug","children":null,"spread":false}],"spread":true},{"title":"obj","children":[{"title":"Debug","children":[{"title":"HY.Web.Entity.csproj.FileListAbsolute.txt <span style='color:#111;'> 847B </span>","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferencesInput.cache <span style='color:#111;'> 6.40KB </span>","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"DeployEntity.cs <span style='color:#111;'> 2.51KB </span>","children":null,"spread":false},{"title":"Properties","children":[{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.34KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"HY.Web.ConsoleTest","children":[{"title":"bin","children":[{"title":"Debug","children":[{"title":"HY.Web.ConsoleTest.vshost.exe <span style='color:#111;'> 23.65KB </span>","children":null,"spread":false},{"title":"HY.Web.ConsoleTest.vshost.exe.manifest <span style='color:#111;'> 490B </span>","children":null,"spread":false},{"title":"HY.Web.ConsoleTest.vshost.exe.config <span style='color:#111;'> 301B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Program.cs <span style='color:#111;'> 1.88KB </span>","children":null,"spread":false},{"title":"obj","children":[{"title":"Debug","children":[{"title":"DesignTimeResolveAssemblyReferencesInput.cache <span style='color:#111;'> 6.99KB </span>","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false},{"title":"HY.Web.ConsoleTest.csproj.FileListAbsolute.txt <span style='color:#111;'> 1.75KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"HY.Web.ConsoleTest.csproj <span style='color:#111;'> 3.55KB </span>","children":null,"spread":false},{"title":"HY.Web.ConsoleTest.csproj.user <span style='color:#111;'> 228B </span>","children":null,"spread":false},{"title":"App.config <span style='color:#111;'> 285B </span>","children":null,"spread":false},{"title":"Properties","children":[{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.35KB </span>","children":null,"spread":false}],"spread":true},{"title":"Deploy.sql <span style='color:#111;'> 3.02KB </span>","children":null,"spread":false}],"spread":true},{"title":"HY.Web.DAO","children":[{"title":"DeployRepository.cs <span style='color:#111;'> 742B </span>","children":null,"spread":false},{"title":"bin","children":[{"title":"Release","children":null,"spread":false},{"title":"Debug","children":null,"spread":false}],"spread":true},{"title":"obj","children":[{"title":"Debug","children":[{"title":"HY.Web.DAO.csproj.FileListAbsolute.txt <span style='color:#111;'> 983B </span>","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferencesInput.cache <span style='color:#111;'> 6.59KB </span>","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"BaseRepository.cs <span style='color:#111;'> 569B </span>","children":null,"spread":false},{"title":"Helper.cs <span style='color:#111;'> 450B </span>","children":null,"spread":false},{"title":"HY.Web.DAO.csproj <span style='color:#111;'> 3.03KB </span>","children":null,"spread":false},{"title":"Properties","children":[{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.33KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"HY.Web.Service","children":[{"title":"bin","children":[{"title":"Release","children":null,"spread":false},{"title":"Debug","children":null,"spread":false}],"spread":true},{"title":"obj","children":[{"title":"Debug","children":[{"title":"DesignTimeResolveAssemblyReferencesInput.cache <span style='color:#111;'> 6.79KB </span>","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false},{"title":"HY.Web.Service.csproj.FileListAbsolute.txt <span style='color:#111;'> 1.38KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"HY.Web.Service.csproj <span style='color:#111;'> 3.36KB </span>","children":null,"spread":false},{"title":"DeployService.cs <span style='color:#111;'> 584B </span>","children":null,"spread":false},{"title":"Properties","children":[{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.34KB </span>","children":null,"spread":false}],"spread":true},{"title":"ServiceBase.cs <span style='color:#111;'> 1.13KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

  • qq_31377027 :
    感谢分享,期待后续新的分享
    2020-09-09
  • haonan_dragon :
    挺好的,刚好用上
    2019-12-16
  • linusfay :
    有帮助,不错
    2019-04-15
  • qq372887896 :
    还行,学习了,谢谢分享
    2019-02-26
  • tl_ztj :
    Thank your share
    2018-09-01

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明