Quantcast
Channel: CSLA .NET
Viewing all articles
Browse latest Browse all 764

SmartDate Question: Appears to be truncating time portion.

$
0
0

I have a ReadOnlyList and a BusinessBase class that contains Event information something like this.

 

 

        public static readonly PropertyInfo<SmartDate> StartProperty = RegisterProperty<SmartDate>(p => p.Start, "Start");

        public string Start

        {

            get { return GetPropertyConvert<SmartDate, String>(StartProperty); }

            set { SetPropertyConvert<SmartDate, String>(StartProperty, value); }

        }

        public static readonly PropertyInfo<SmartDate> EndProperty = RegisterProperty<SmartDate>(p => p.End, "End");

        public string End

        {

            get { return GetPropertyConvert<SmartDate, String>(EndProperty); }

            set { SetPropertyConvert<SmartDate, String>(EndProperty, value); }

        }

When the entity is Created with a value that contains both a date and time via the BusinessBase object the time is stored correctly in the database.
When the application retrieves the objects & values via SafeDataReader and into my ReadOnlyList into the Mvc4 application it seems to have truncated the time portion of the date.
What am I doing wrong? Any suggestions?
Thanks.

 

 


Viewing all articles
Browse latest Browse all 764

Trending Articles