Reputation: 15378
How add new property to WorkSpace which will show the name room?
Upvotes: 0
Views: 59
Reputation: 364279
This property cannot be defined in entity designer unless it is also defined in the database as column of WorkPanel
table. Create partial class to generated entity and add custom property:
public partial class WorkPanel
{
public string Name
{
get
{
return (Table != null && Table.Room != null) ? Table.Room.Name : null;
}
}
}
To use this property you must always load Table
and Room
entity with WorkPanel
(either by eager or lazy loading).
Upvotes: 1