protected override void OnModelCreating(Modelbuilder modelBuilder) { modelBuilder.Entity<Company>() .HasMany(c => c.Employees) .WithOne(e => e.Company); }