I have a number of business objects in my application with date properties. When an object is created, the CodeSmith template specifies that the date properties should all be initialized to DateTime.Today. This doesn't work for us, as it can fill in a date for certain fields that no date truly applies for. For instance, in a customer object, the "Last Invoiced Date" should be blank if the customer has never been invoiced. Can anyone reccomend the proper way to handle this?
Thank you for your assistance
Rob
Keep in mind that you can modify the templates to suit your needs.
I initialize Smart dates like this:
Protected
mSomeDate As New SmartDateJoe
JoeFallon1:
Keep in mind that you can modify the templates to suit your needs.
I initialize Smart dates like this:
Protected
mSomeDate As New SmartDateJoe
If you have useful naming conventions ( and follow them!), you can make your templates initialize SmartDate objects differently:
Protected EffectiveDate As New SmartDate(false)
Protected ExpirationDate As New SmartDate(true)
Copyright (c) Marimer LLC