c# - Add foreign key relationship to existing read-only database in Entity Framework -
i have existing database read , cannot alter structure.
the tables in database have columns can use join in sql queries, want use entity framework create model these columns linked if foreign keys.
is there way create relationship in class structure, if key not present in actual database?
with legacy database schema not recommend trying introduce navigation properties , artificial relationship in ef model. if need "related" data in 1 query use manual linq joins or stored procedures join data , map loaded items specialized class.
Comments
Post a Comment