Invalid column name when trying to add an entity to a database using DbContext
问题 I'm trying to add an entity to my database with the following code: public void StoreElectronicSignatureType(ElectronicSignatureTypeModel model) { [...] ElectronicSignatureType electronicSignatureType = new ElectronicSignatureType(); Entity entity = GetEntity("Test"); electronicSignatureType.Entity = entity; Add(electronicSignatureType); public void Add(object entity) { DbContext.Entry(entity).State = System.Data.EntityState.Added; //DbContext.Set(entity.GetType()).Add (entity); DbContext