Hi Anthony,
You can do that, however I wouldn't modify the original value as this could be confused and will make the entity dirty. Instead I would create a new property for reflect the adjusted date-time:
public partial class SomeEntity
{
public DateTime MyLocalDate
{
DateTime myLocalDate = DateTime.Now();
if (MyUTCDate != null)
{
myLocalDate = MyUTCDate.AddHours(xxx);
}
return myLocalDate;
}
}
Then somewhere you could use both members (the original field and the new property);
DateTime myOriginalDate = someEntity.MyUTCDate;
DateTime myLocalDate = someEntity.MyLocalDate;
This should work for databinding as well
Let us know if this work for you.