-
I found many examples online covering how to serialize NHibernate entities for use over a WCF channel, while still using lazy and eager loading. In my application, my database models and my SOA models needed to be exactly the same; therefore, I wanted to avoid the use of DTOs. However, none of the examples...
-
I originally blogged about this here and here on my blog but Fabio suggested I add these posts to the Forge, so here I am. I have to say I am a little exited to make my first contribution to the Wiki [H]. I will try to add a bit more to them and show some examples that do not use the TableGenerator class...
-
If you want to know if an unloaded collection in an entity contains elements, or count them, without actually loading them, you need to use a custom query; that is because the Count property (if the collection is not mapped with lazy=”extra” ) and the LINQ Count() and Any() methods force...
-
As our users might know, the Devart company has recently released a new version of Entity Developer that supports NHibernate that is intended to provide users with a powerful and convenient visual model designer for NHibernate . When writing templates for generating entity classes for NHibernate models...
-
When using mapping by code it may not be 100% obvious what XML is being generated for NHibernate. You have a couple of options, the first option is to tell NHibernate to write all your mappings into the bin folder:- var mapper = new ModelMapper(); mapper.AddMappings(typeof(CmsMeta).Assembly.GetTypes...
-
NHibernate has a commercial side as well as the Open Source Products available as add ons. Agility for ORMs Castle ActiveRecord Model Code Generator http://www.AgilityForORMs.com/ CodeSmith http://www.codesmithtools.com/ DB Visual Architect http://www.visual-paradigm.com/product/dbva/ GenWise http:/...
-
Let's take a look at the following code: public class TaxCalculator { public static readonly TaxCalculator NoTax = new TaxCalculator("No Tax", 0.0); public TaxCalculator() { } public TaxCalculator(String name, Double percentage) { this.Name = name; this.Percentage = percentage; } public...
-
nhibertbate
-
The NHibernate 3 Trunk-Version contains a new Interface "IInternalLogger" which provides interface for custom loggers to be configured with NHibernate. NHibernate provides' a log4net log provider for this interface out of the box. So if you are using NHibernate with log4net just deliver...
-
Why would you want to use this source? You'll want to use this source if your using NHibernate and need your entities to maintain their state through long conversations, over multiple NHibernate sessions. You might also want to use it if you want built in auditing power and general state oriented...