Hi all, I want to create a custom property on one of my entities mapped from the database, however this property is not mapped to the database, I created the property using partial classes but when trying to compile I get an error telling me that the property is not mapped. Is there an attribute or something I should add? Thanks in advance.
A:
Use partial classes to add the properties or methods you want added. E.g.
namespace WhateverNamespaceYourEntityModelIsIn
{
public class partial TheNameOfYourEntity
{
public string MyNewProperty { get; set; }
}
}
and that should do you.
Orion Adrian
2010-03-09 16:21:10