• 2024-01-16SqlSugar新增数据
    1、插入方式1.1单条插入实体//返回插入行数db.Insertable(insertObj).ExecuteCommand(); //都是参数化实现//异步: await db.Insertable(insertObj).ExecuteCommandAsync() //插入返回自增列 (实体除ORACLE外实体要配置自增,Oracle需要配置序列)db.Insertable(in
  • 2024-01-16SqlSugar更新数据
    1、根据实体对象更新所谓按实体对象更新就是:db.Updateable(参数对象)有参数的重载db.Updateable(实体或者集合).ExecuteCommand() //右标题1 下面的所有菜单优点1、代码少2、支持各种批量修改缺点1、不支持表达式和sql函数2、依赖 实体对象,没实体对象就需
  • 2024-01-16SqlSugar删除数据
    1、根据实体删除1.1强类型实体 需要配置主键,根据主键删除需要给实体配置主键,参考文档实体配置//单个实体db.Deleteable<Student>(new Student() { Id = 1 }).ExecuteCommand(); //List<实体> (可以不加Where)List<Student> list=new List<Student>(){