Subtotal of ORM technology I know

1 Nhibernate not used in the actual project
reason: The more, the information is relatively easy to find.
2 Castle ActiveRecord
reason: no need to configure the XML file of the object, which is cooler than Nhibernate
3 EntityFramework
reason: Microsoft stuff

4 mybaits.net have not seen


5 I haven't seen anything found online

http://www.cnblogs.com/humble/archive/2011/12/24/2300650.html

Related learning materials

http://blog.csdn.net/zxc22436/article/details/6875220

 This is the book LINQ to Entities, LINQ to SQL, NHibernate, LLBLGen Pro, SubSonic, WilsonORM, or basic ADO.NET
DataReaders, DataSets

1 I saw a project of a large real estate group in Nhibernate (a friend's project)

2  Castle ActiveRecord 

http://terrylee.cnblogs.com/archive/2006/04/03/365762.html  Excerpt

If you have used NHibernate , you will definitely be impressed by writing .hbm.xml files in NHibernate , and so am I. In Castle ActiveRecord , we no longer have to worry about writing complicated mapping files. ActiveRecord is a data access framework provided in Castle . It encapsulates the operation of NHibernate at the bottom and uses features instead of mapping files. It provides conciseness. The O/R mapping will make you wonder how simple it is to implement a persistent data layer

From the data access framework to the IOC container to the WEB framework, it basically includes everything in the entire development process. It seems that I have to study and research, and I intend to record some of the things in my learning process. Let’s start with ActiveRecord . The concise O/R mapping provided by ActiveRecord left a deep impression on me.

Build configuration information

Now we need to tell ActiveRecord related database, data-driven and other information, the easiest is to use the configuration file

<? xml version="1.0" encoding="utf-8"  ?>
< configuration >
     < configSections >
         < section  name ="activerecord"  type ="Castle.ActiveRecord.Framework.Config.ActiveRecordSectionHandler, Castle.ActiveRecord"   />
     </ configSections >
     < activerecord >
         < config >
             < add  key ="hibernate.connection.driver_class"  value ="NHibernate.Driver.SqlClientDriver"   />
             < add  key ="hibernate.dialect"  value ="NHibernate.Dialect.MsSql2000Dialect"   />
             < add  key ="hibernate.connection.provider"  value ="NHibernate.Connection.DriverConnectionProvider"   />
             < add  key ="hibernate.connection.connection_string"  value ="UID=sa;Password=sa;Initial Catalog=ARDemo;Data Source=."   />
         </ config >
     </ activerecord >
</ configuration >


Friends who have used NHibernate will be familiar with this configuration code. Yes, because ActiveRecord encapsulates NHibernate at the bottom, the configuration here is the same as the configuration when using NHibernate. It also specifies the data source driver, connection string, etc. information. If you use the configuration file, just initialize it like this in the code.


IConfigurationSource source = System.Configuration.ConfigurationSettings.GetConfig("activerecord")  as IConfigurationSource;
ActiveRecordStarter.Initialize( source,  typeof(User) );


IOC used in many projects of Dongfeng Nissan, Castle ActiveRecord , is open, efficient, fast and stable, and easy to maintain, but with poor performance.

3  EntityFramework

It’s easy to get started if you don’t have more than three or five years of work experience with linq to sql, it’s very difficult to do this 

China Merchants Bank’s current b2b main push project uses this performance is very poor

4 mybaits.net

Some friends with current qualifications have not seen them.



Guess you like

Origin blog.csdn.net/cao919/article/details/10902373