Quantcast
Channel: Entity Framework
Viewing all articles
Browse latest Browse all 10318

Created Unassigned: Exception could be improved when EntitySet.Table is changed from CSpace [1303]

$
0
0
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;
}
}

Viewing all articles
Browse latest Browse all 10318

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>