We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
以下的示例代码,FreeSql 使用 EFCore 的实体特性。
fsql.CodeFirst.ConfigEntity<ModelAopConfigEntity>(a => a.Property(b => b.pkid).IsPrimary(true)); fsql.Aop.ConfigEntity = (s, e) => { var attr = e.EntityType.GetCustomAttributes(typeof(System.ComponentModel.DataAnnotations.Schema.TableAttribute), false).FirstOrDefault() as System.ComponentModel.DataAnnotations.Schema.TableAttribute; if (attr != null) e.ModifyResult.Name = attr.Name; }; fsql.Aop.ConfigEntityProperty = (s, e) => { if (e.Property.GetCustomAttributes(typeof(System.ComponentModel.DataAnnotations.KeyAttribute), false).Any()) e.ModifyResult.IsPrimary = true; }; [System.ComponentModel.DataAnnotations.Schema.Table("xxx")] class ModelAopConfigEntity { [System.ComponentModel.DataAnnotations.Key] [Column(IsPrimary = false)] public int pkid { get; set; } }
The text was updated successfully, but these errors were encountered:
- 修复 ISelect.ToList(true) 无效的 bug;
e2d33e9
- 增加 IAop.ConfigEntity 配置实体特性,可实现使用其他 ORM 的实体特性,#36;
o( ̄▽ ̄)d大拇哥
Sorry, something went wrong.
No branches or pull requests
自定义特性
以下的示例代码,FreeSql 使用 EFCore 的实体特性。
The text was updated successfully, but these errors were encountered: