免费NHibernate的辅助工具? [英] Free NHibernate helper tools?

查看:115
本文介绍了免费NHibernate的辅助工具?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有免费的工具来帮助简化与.NET 3.5的NHibernate的项目中工作?首先,我在寻找某种code和配置文件生成器来自动执行某些与NHibernate的工作比较繁琐的部分。

Are there any free tools to help simplify working with an NHibernate project in .NET 3.5? Primarily, I'm looking for some kind of code and config file generator to automate some of the more tedious parts of working with NHibernate.

推荐答案

Fluent- NHibernate的 presents写你的映射,即例如更重构比标准的XML方法友好的另一种方式。

Fluent-NHibernate presents an alternative way of writing your mapping, that for example is more refactor friendly than the standard XML approach.

例如:

public CustomerMap : ClassMap<Customer>
{
  public CustomerMap()
  {
    Id(x => x.ID);
    Map(x => x.Name);
    Map(x => x.Credit);
    HasMany<Product>(x => x.Products)
      .AsBag();
    Component<Address>(x => x.Address, m =>  
    {  
        m.Map(x => x.AddressLine1);  
        m.Map(x => x.AddressLine2);  
        m.Map(x => x.CityName);  
        m.Map(x => x.CountryName);  
    });
}

这篇关于免费NHibernate的辅助工具?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆