Skip to content

zhouweiaccp/nhibernate-core

 
 

Repository files navigation

Welcome to NHibernate

NHibernate is a mature, open source object-relational mapper for the .NET framework. It is actively developed, fully featured and used in thousands of successful projects.

The NHibernate community website - http://nhibernate.info - has a range of resources to help you get started, including howtos, blogs and reference documentation.

Latest Version

The quickest way to get the latest release of NHibernate is to add it to your project using NuGet (http://nuget.org/List/Packages/NHibernate).

Alternatively binaries are available from SourceForge at http://sourceforge.net/projects/nhibernate.

You are encouraged to review the release notes (releasenotes.txt), particularly when upgrading to a later version. The release notes will generally document any breaking changes.

link


There are two official NHibernate community forums:

Bug Reports

If you find any bugs, please report them using the GitHub issue tracker. A test-case that demonstrates the issue is usually required. Instructions on providing a test-case can be found in contributing guidelines or here.

Licenses

Credits

Many thanks to the following individuals, organisations and projects whose work is so important to the success of NHibernate (in no particular order):

项目查询中,常常需要返回指定的字段,下面是三种Nhibernate的方法

1.linq to Nhibernate public class NameID { public int Id { get; set; } public string Name { get; set; } } var discontinuedProducts = session .Query() .Where(p => p.Discontinued) .Select(p => new NameID { Id = p.Id, Name = p.Name }); 2.Nhibernate(3.0后支持) var productsLookup = session.QueryOver() .Select(p => p.Id, p => p.Name) .TransformUsing(Transformers.AliasToBean()) .List(); 3.Nhibernate HQL var productsLookup = session .CreateQuery("select Id as Id, Name as Name from Product") .SetResultTransformer(Transformers.AliasToBean()) .List();

About

NHibernate Object Relational Mapper

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 95.3%
  • TSQL 4.1%
  • GAP 0.2%
  • JavaScript 0.2%
  • Visual Basic .NET 0.1%
  • Batchfile 0.1%