c# - A dependent property in a ReferentialConstraint is mapped to a store-generated column. Column: 'ID' -
c# - A dependent property in a ReferentialConstraint is mapped to a store-generated column. Column: 'ID' -
i can't figure out why error when seek add together venue object , phone call savechanges(). difference in model venue objects 1 1..0 relation city.
city city = processcitycache(ev, country, db); // after call, 'city' persisted. venue = new venue { ticketmasterurl = ev.venueseolink, name = capitalize(ev.venuename), city = city }; db.venues.addobject(venue); db.savechanges(); // exception thrown here. any insight appreciated!
(open image in own tab/window see total size)
i found problem. fault. had fk_venue_city relationship set city.id -> venue.id wanted city.id -> venue.cityid. made alter in database updated model.
c# .net entity-framework entity-framework-4
Comments
Post a Comment