ORM 革命 —— 复兴 | ORM Revolution -- Revived
ORM Revolution - Revived
ORM 革命 —— 复兴
Under the flourious business logics, there exists the terrifying vanity.
在繁华的业务逻辑之下,却是令人感到一丝毛骨悚然的虚无。
Destination 归宿
The ORM should not have any XML config files or Attribute in business object.ORM不应该拥有各种xml配置文件或者业务实体的属性标签。
The ORM should seperate the Object Schema from Object Data.
ORM应该分离业务实体结构元数据和业务实体数据。
The ORM user should not concern the way ORM store the data.
ORM的用户不应该关注ORM如何对对象进行存储的。
Download 下载
Demo Project:/Files/zc22/Noebe.ORM.Demo.rar
Demo Database:/Files/zc22/TESTOBJ.rar
Attention: The demo project is just for TRIAL. Please DO NOT use in commercial purpose.
注意: 演示项目目前仅用于测试。请不要使用于商业目的。
{
static void Main(string[] args)
{
NoebeConfiguration config = new NoebeConfiguration();
config.Filename = @"e:\temp\TESTOBJ.MDB"; //请修改
config.DatabaseType = Pixysoft.Framework.XSchEmA.DatabaseType.Access;
OrmManager.Initialize(config);
Card card = new Card();
card.CardType = "Noebe.ORM";
List<Email> maillist = new List<Email>();
for (int i = 0; i < 10; i++)
{
Email mail = new Email();
mail.Address = "China" + i;
maillist.Add(mail);
}
Person p = new Person();
p.PersonName = "pixysoft";
p.Card = card;
p.EmailList = maillist;
OrmManager.Instance.Commit(p);
Card test_card = p.Card;
Console.WriteLine(test_card.CardType);
Console.WriteLine(p.PersonName);
List<Email> test_emaillist = p.EmailList;
foreach (Email test_email in test_emaillist)
Console.WriteLine(test_email.Address);
}
class Card : ObjBase
{
public string CardType
{
get { return null; }
set
{
}
}
}
class Email : ObjBase
{
public string Address
{
get { return null; }
set { }
}
}
class Person : ObjBase
{
public string PersonName
{
get { return null; }
set { }
}
public Card Card
{
get { return null; }
set { }
}
public List<Email> EmailList
{
get { return null; }
set { }
}
}
}
If there is an ORM revolution, we hope it comes from China.
如果有那么一场ORM革命,我希望他来自中国。
To be continued ...
待续 ...
Join us! We need your help! (NOSU, Non Open Source Union)
加入我们,我们需要您的帮助!(NOSU, 非开源联盟)
Email: reborn_zhang@hotmail.com
Noebe Team
2007 - 10 -22
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!