This project has moved and is read-only. For the latest updates, please go here.

Minor issue with SetRelatedObjects

Feb 3, 2014 at 10:01 AM
When setting a collection of an object to null it crashes. I just added an if in .tt file, but i'm not sure what is the intended behaviour when null is set

.tt file:
............
if(value == null) return;
SetRelatedObjects(<#= code.CreateLiteral(p.Name)#>, value); 
Feb 5, 2014 at 6:38 PM
I think it should throw an ArgumentNullException rather than silently return. I'll update the .tt file.