为了账号安全,请及时绑定邮箱和手机立即绑定

c# ORM问题。

c# ORM问题。

凤凰求蛊 2018-12-07 00:29:06
同事离职了。网上下载了套源码在用,不知道这个用的是什么orm框架?园友看下。 如图: 这个是生成的实体类: namespace Song.Entities { using System; /// /// 表名:Accessory 主键列:As_Id /// [SerializableAttribute()] public partial class Accessory : WeiSha.Data.Entity { protected Int32 _As_Id; protected String _As_Name; protected String _As_FileName; protected String _As_Type; protected DateTime _As_CrtTime; protected Int32 _As_Size; protected String _As_Uid; protected Int32 _Org_ID; protected String _Org_Name; /// /// -1 /// public Int32 As_Id { get { return this._As_Id; } set { this.OnPropertyValueChange(_.As_Id, _As_Id, value); this._As_Id = value; } } /// /// -1 /// public String As_Name { get { return this._As_Name; } set { this.OnPropertyValueChange(_.As_Name, _As_Name, value); this._As_Name = value; } } /// /// -1 /// public String As_FileName { get { return this._As_FileName; } set { this.OnPropertyValueChange(_.As_FileName, _As_FileName, value); this._As_FileName = value; } } /// /// -1 /// public String As_Type { get { return this._As_Type; } set { this.OnPropertyValueChange(_.As_Type, _As_Type, value); this._As_Type = value; } } /// /// -1 /// public DateTime As_CrtTime { get { return this._As_CrtTime; } set { this.OnPropertyValueChange(_.As_CrtTime, _As_CrtTime, value); this._As_CrtTime = value; } } /// /// -1 /// public Int32 As_Size { get { return this._As_Size; } set { this.OnPropertyValueChange(_.As_Size, _As_Size, value); this._As_Size = value; } } /// /// -1 /// public String As_Uid { get { return this._As_Uid; } set { this.OnPropertyValueChange(_.As_Uid, _As_Uid, value); this._As_Uid = value; } } public Int32 Org_ID { get { return this._Org_ID; } set { this.OnPropertyValueChange(_.Org_ID, _Org_ID, value); this._Org_ID = value; } } public String Org_Name { get { return this._Org_Name; } set { this.OnPropertyValueChange(_.Org_Name, _Org_Name, value); this._Org_Name = value; } } /// /// 获取实体对应的表名 /// protected override WeiSha.Data.Table GetTable() { return new WeiSha.Data.Table("Accessory"); } /// /// 获取实体中的标识列 /// protected override WeiSha.Data.Field GetIdentityField() { return _.As_Id; } /// /// 获取实体中的主键列 /// protected override WeiSha.Data.Field[] GetPrimaryKeyFields() { return new WeiSha.Data.Field[] { _.As_Id}; } /// /// 获取列信息 /// protected override WeiSha.Data.Field[] GetFields() { return new WeiSha.Data.Field[] { _.As_Id, _.As_Name, _.As_FileName, _.As_Type, _.As_CrtTime, _.As_Size, _.As_Uid, _.Org_ID, _.Org_Name}; } /// /// 获取列数据 /// protected override object[] GetValues() { return new object[] { this._As_Id, this._As_Name, this._As_FileName, this._As_Type, this._As_CrtTime, this._As_Size, this._As_Uid, this._Org_ID, this._Org_Name}; } /// /// 给当前实体赋值 /// protected override void SetValues(WeiSha.Data.IRowReader reader) { if ((false == reader.IsDBNull(_.As_Id))) { this._As_Id = reader.GetInt32(_.As_Id); } if ((false == reader.IsDBNull(_.As_Name))) { this._As_Name = reader.GetString(_.As_Name); } if ((false == reader.IsDBNull(_.As_FileName))) { this._As_FileName = reader.GetString(_.As_FileName); } if ((false == reader.IsDBNull(_.As_Type))) { this._As_Type = reader.GetString(_.As_Type); } if ((false == reader.IsDBNull(_.As_CrtTime))) { this._As_CrtTime = reader.GetDateTime(_.As_CrtTime); } if ((false == reader.IsDBNull(_.As_Size))) { this._As_Size = reader.GetInt32(_.As_Size); } if ((false == reader.IsDBNull(_.As_Uid))) { this._As_Uid = reader.GetString(_.As_Uid); } if ((false == reader.IsDBNull(_.Org_ID))) { this._Org_ID = reader.GetInt32(_.Org_ID); } if ((false == reader.IsDBNull(_.Org_Name))) { this._Org_Name = reader.GetString(_.Org_Name); } } public override int GetHashCode() { return base.GetHashCode(); } public override bool Equals(object obj) { if ((obj == null)) { return false; } if ((false == typeof(Accessory).IsAssignableFrom(obj.GetType()))) { return false; } if ((((object)(this)) == ((object)(obj)))) { return true; } return false; } public class _ { /// /// 表示选择所有列,与*等同 /// public static WeiSha.Data.AllField All = new WeiSha.Data.AllField(); /// /// -1 - 字段名:As_Id - 数据类型:Int32 /// public static WeiSha.Data.Field As_Id = new WeiSha.Data.Field("As_Id"); /// /// -1 - 字段名:As_Name - 数据类型:String /// public static WeiSha.Data.Field As_Name = new WeiSha.Data.Field("As_Name"); /// /// -1 - 字段名:As_FileName - 数据类型:String /// public static WeiSha.Data.Field As_FileName = new WeiSha.Data.Field("As_FileName"); /// /// -1 - 字段名:As_Type - 数据类型:String /// public static WeiSha.Data.Field As_Type = new WeiSha.Data.Field("As_Type"); /// /// -1 - 字段名:As_CrtTime - 数据类型:DateTime /// public static WeiSha.Data.Field As_CrtTime = new WeiSha.Data.Field("As_CrtTime"); /// /// -1 - 字段名:As_Size - 数据类型:Int32 /// public static WeiSha.Data.Field As_Size = new WeiSha.Data.Field("As_Size"); /// /// -1 - 字段名:As_Uid - 数据类型:String /// public static WeiSha.Data.Field As_Uid = new WeiSha.Data.Field("As_Uid"); /// /// 字段名:Org_ID - 数据类型:Int32 /// public static WeiSha.Data.Field Org_ID = new WeiSha.Data.Field("Org_ID"); /// /// 字段名:Org_Name - 数据类型:String /// public static WeiSha.Data.Field Org_Name = new WeiSha.Data.Field("Org_Name"); } } }     本人用orm 比较少  请问中是什么orm框架呢?一般有哪些常见的 ef? linq to sql? nhibernate? 其实这个也就是个同事在网上下载的一个源码 来用的 没看到他的数据库访问介绍。 http://www.51aspx.com/Code/MicroXiamenOnlineTraining 还用了 个VTemplate模板。
查看完整描述

5 回答

?
肥皂起泡泡

TA贡献1829条经验 获得超6个赞

不是学习 就问下他的这个orm名称是什么 我简单了解下 ,接手。
查看完整回答
反对 回复 2018-12-09
?
墨色风雨

TA贡献1853条经验 获得超6个赞

@s_p: 没见过.应该是自己封装的东西.你跟进去看代码就是.
查看完整回答
反对 回复 2018-12-09
?
繁星coding

TA贡献1797条经验 获得超4个赞

spring.data.dll 已经说明了
查看完整回答
反对 回复 2018-12-09
  • 5 回答
  • 0 关注
  • 681 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信