EF Reverse Engineering can't handle " #" in column name.
Bill Duffy
0
Reputation points
I have a database that uses two different fields:
string "Asset
int "Asset #"
After running EF Reverse Engineering on the existing database, it creates a model with:
[Column("Asset")]
public string Asset { get; set; }
[Column("Asset #")]
public int Asset { get; set; }
This causes compile errors and fails to build. In this case I am running a secondary script that edits the resulting files and changes "int Asset" to "int AssetNum", which is a hack at best.
Is there another method within EF I can use to fix this?
Sign in to answer