Friends! I need to turn off the navigation, but the rest of the action is to remain the same, e.g. a column containing a foreign key must be created. I want to achieve similar behavior as Envers for nHibernate (https://github.com/nhibernate/nhibernate-envers) - data copy per table but without navigation. Is it possible? It's great if you could show an example in the code... EF Core version: Database provider: Pomelo.EntityFrameworkCore.MySql Target framework: .NET Core 3.1 or .NET 5.0
Activity
ajcvickers commentedon Dec 2, 2020
@patrykdawid Here's an example of configuring a relationship without navigations. We will add this to the docs.
This maps to the following tables in SQL Server:
CREATE TABLE [Blogs] ( [Id] int NOT NULL IDENTITY, [Name] nvarchar(max) NULL, CONSTRAINT [PK_Blogs] PRIMARY KEY ([Id]) ); CREATE TABLE [Posts] ( [Id] int NOT NULL IDENTITY, [Content] nvarchar(max) NULL, [BlogId] int NULL, CONSTRAINT [PK_Posts] PRIMARY KEY ([Id]), CONSTRAINT [FK_Posts_Blogs_BlogId] FOREIGN KEY ([BlogId]) REFERENCES [Blogs] ([Id]) ON DELETE NO ACTION );Major overhaul of the "relationships" documentation
Major overhaul of the "relationships" documentation
Major overhaul of the "relationships" documentation
Major overhaul of the "relationships" documentation
Major overhaul of the "relationships" documentation
Major overhaul of the "relationships" documentation
Major overhaul of the "relationships" documentation
Major overhaul of the "relationships" documentation
Major overhaul of the "relationships" documentation
Major overhaul of the "relationships" documentation
Major overhaul of the "relationships" documentation