FreeSql 是一个功能强大的 NETStandard 库,用于对象关系映射程序(O/RM),提供了 CodeFirst/DbFirst/CURD/表达式函数/读写分离 等基础封装。支持 .NETCore 2.1+ 或 .NETFramework 4.6.1+。
新的查询功能
publicclassSong{ [Column(IsIdentity = true)]publicintId {get;set; }publicDateTime? Create_time {get;set; }publicbool? Is_deleted {get;set; }publicstringTitle {get;set; }publicstringUrl {get;set; }publicvirtualICollection Tags {get;set; }}publicclassSong_tag{publicintSong_id {get;set; }publicvirtualSong Song {get;set; }publicintTag_id {get;set; }publicvirtualTag Tag {get;set; }}publicclassTag{ [Column(IsIdentity = true)]publicintId {get;set; }publicint? Parent_id {get;set; }publicvirtualTag Parent {get;set; }publicdecimal? Ddd {get;set; }publicstringName {get;set; }publicvirtualICollection Songs {get;set; }publicvirtualICollection Tags {get;set; }}//OneToOne、ManyToOnevart0 = fsql.Select().Where(a => a.Parent.Parent.Name =="粤语").ToSql()