天天看點

.net下的幾個O/R Mapping架構對比,資料實體的驗證

幾個.net的O/R架構

名稱

URL

Pros

Cons

Microsoft Entity Framework

msdn

官方支援

可視化很好

發展時間相對短

NHibernate

<a href="http://nhforge.com">http://nhforge.com</a>

開發支援,時間很長

比較複雜

Subsonic

<a href="http://subsonicproject.com">http://subsonicproject.com</a>

Active Record

Auto-generate code

Open Source,

Not flexible

Genome

<a href="http://www.genom-e.com">http://www.genom-e.com</a>

Flexible

Expensive,

Sparse documentation

資料實體的有效性驗證可以使用.net4中的标注屬性或者驗證架構

one of these is for data validation using attributes, and another is the visual description of fields, properties, and methods, or to customize the data type of a specific property . These three categories are classified in the .NET Framework as Validation Attributes, Display Attributes, and Data Modeling Attributes .

繼續閱讀