When a model based convention on EntitySet modifies EntitySet.Table from CSpace a somewhat unclear exception is thrown. What this message actually means is that the .Table property must be changed from SSpace rather than CSpace, but this is not clear from the message
Exception
Schema specified is not valid. Errors:
(0,0) : error 0005: The 'Table' attribute is not allowed.
Convention:
class ModelBasedConvention : IModelConvention<EntitySet>
{
public void Apply(EntitySet entity, EdmModel model)
{
entity.Table = "_" + entity.Table;
}
}
Exception
Schema specified is not valid. Errors:
(0,0) : error 0005: The 'Table' attribute is not allowed.
Convention:
class ModelBasedConvention : IModelConvention<EntitySet>
{
public void Apply(EntitySet entity, EdmModel model)
{
entity.Table = "_" + entity.Table;
}
}