Last post Sep 08, 2011 09:08 AM by greatbear
Sep 07, 2011 10:37 AM|greatbear|LINK
Using a DD site, is it possible to display a property that is not in the database? For eg., in the Employee table there is hire date and terminatation date. In the view template I want to calculate and show how long the employee has worked for the company,
even though this is not stored anywhere in the database. I tried adding a string property to the partial class of the table, and decorating it with ScaffoldColumn(true), but that had no effect.
Sep 08, 2011 06:03 AM|sjnaughton|LINK
Hi Bear is Linq To SQL you can do this just create a custom property and add the [ScaffoldeColumn(true)] attribute to it. However you cannot
do this with Entity Framework for EF I usually use a Computed Column in the dB.
Sep 08, 2011 09:08 AM|greatbear|LINK
i guess i'l have to do that as well then.