2

I have a model class that has a property called Birthday with is a DateTime? property. I also have a calculated column that is read only that looks like this:

public int? RacingAge
{
  get
  {
    if (!Birthday.HasValue)
      return null;
    else
      return DateTime.Today.Year - Birthday.Value.Year;
   }
 }

When I run the query, this value comes back in the Json that is returned, but the property isn't part of the metadata so it doesn't get set.

What do I need to do to force this to get included in the metadata?

Bryant
  • 8,660
  • 1
  • 33
  • 53
  • Excellent question. Exploring it. Stay tuned. – Ward Jan 19 '13 at 03:27
  • 2
    Take a look at [this StackOverflow question and answer](http://stackoverflow.com/questions/16524073/handling-calculated-properties-with-breezejs-and-web-api) which shows how to get calculated properties into your model. Much has happened since Jan. – Ward May 14 '13 at 04:41

0 Answers0