Skip to content

v0.10.15 (.Net Framework 4.0)

Compare
Choose a tag to compare
@2881099 2881099 released this 23 Oct 04:43
· 2513 commits to master since this release
  • 增加 .Net Framework 4.0 的支持,出于环境考虑 .Net Framework 4.0 不支持异步方法;
  • 增加 IndexAttribute 特性,自动迁移索引,以及对应的 FluentApi 方法;
  • 增加 NavigateAttribute 特性对应的 Fluent 功能;#96
  • 增加 ColumnAttribute 可插入(CanInsert)、可更新(CanUpdate);#99
  • 增加 IFreeSql.Insert<T>(List source) 方法;
  • 增加 Aop.ConfigEntity 属性 ModifyIndexResult 现实 IndexAttribute 的设置;
  • 增加 PostgreSQL 的 Odbc 访问提供,相比 FreeSql.Provider.PostgreSQL 支持的类型更少;
  • 增加 通用的 Odbc 访问提供,不能迁移实体到数据库,不能 Skip 这样来分页,理论上能 crud 所有 odbc 数据库;
  • 增加 DbContext/Repository ManyToMany联级保存功能(之前已支持OneToMany);

文档: https://github.com/2881099/FreeSql/wiki/%e8%81%94%e7%ba%a7%e4%bf%9d%e5%ad%98

  • 增加 FreeSql.DbContext 实体对象的变化事件;

文档: https://github.com/2881099/FreeSql/wiki/DbContext#%E5%AE%9E%E4%BD%93%E5%8F%98%E5%8C%96%E4%BA%8B%E4%BB%B6

  • 增加 List<T1> 扩展方法 IncludeMany,实现从已知的内存 List 数据,进行和 ISelect.IncludeMany 相同功能的贪婪加载;

示例:new List<Song>(new[] { song1, song2, song3 }).IncludeMany(g.sqlite, a => a.Tags);
文档:https://github.com/2881099/FreeSql/wiki/%e8%b4%aa%e5%a9%aa%e5%8a%a0%e8%bd%bd#%E5%AF%BC%E8%88%AA%E5%B1%9E%E6%80%A7-onetomanymanytomany


  • 优化 FreeSqlBuilder 处理 MaxLength 特性的容器处理;
  • 优化 枚举属性的默认值容错,枚举下标不存在 0 的时候,mysql 迁移结构默认值报错;
  • 优化 ORACLE Command 绑定变量 BindByName = true;#107
  • 优化 IUpdate.IgnoreColumns/UpdateColumns 可对属性名,或字段名做设置;#95
  • 优化 忽略 List<T> 作为 Curd 类型操作;
  • 补充 Aop.CurdBefore 事件参数 Table 实体类型的元数据;

  • 修复 Pgsql string[] 属性表达式 Contains 缺少类型转换的 SQL 语法错误;
  • 修复 postgresql 12 移除 pg_attrdef.adsrc 列,导致 CodeFirst 方法失败的 bug;
  • 修复 PostgreSQL DbFirst 获取字段类型的时候,没有拼得字符串的长度(如 varchar(255));
  • 修复 DbFirst 当表数量过大时(如 oracle 表数量大于 1000),可能报错的 bug;
  • 修复 FreeSql.DbContext/FreeSql.Repository 当主键为 Guid? 可空类型时,发生参数错误;

System.ArgumentException:“Expression of type 'System.Guid' cannot be used for assignment to type 'System.Nullable`1[System.Guid]'”


  • 移除 ColumnAttribute.Unique 属性设置,改为 IndexAttribute 特性设置唯一键;