首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
您找到你想要的搜索结果了吗?
是的
没有找到

DBHelper数据库操作类(一)

try             {                 DataSet ds = new DataSet();                 dAdapter.SelectCommand.CommandTimeout...            using (DbCommand dc = DbFactory.CreateCommand(strSql, conn))             {                 dc.CommandTimeout...            using (DbCommand dc = DbFactory.CreateCommand(strSql, conn))             {                 dc.CommandTimeout...            using (DbCommand dc = DbFactory.CreateCommand(strSql, conn))             {                 dc.CommandTimeout...            using (DbCommand dc = DbFactory.CreateCommand(strSql, conn))             {                 dc.CommandTimeout

4.4K10

C# 数据操作系列 - 18 让Dapper更强的插件

commandTimeout = null) where T : class; 其中 transcation表示事务,如果指定事务,数据的提交将由事务控制,该方法会返回插入对象的主键(如果对象主键是数字类型...commandTimeout = null) where T : class; 通过传入主键,获取一个数据 获取所有数据: public static IEnumerable GetAll...commandTimeout = null) where T : class; 更新数据: Dapper Contrib 提供了一个用来更新的方法: public static bool Update...commandTimeout = null) where T : class; public static bool DeleteAll(this IDbConnection connection...commandTimeout = null) where T : class; 删除也是传入一个实体类,一样也只是需要主键有值,如果没有找到主键对应的数据,则不会有任何变化。

1.5K10
领券