I am trying to add the VipClient entity to the database.

Here is the database diagram: Imgur

Model:

public class VipClient { public long Id { get; set; } public virtual Client Client { get; set; } public string Comment { get; set; } public DateTime CreationTime { get; set; } } 

Mapping:

 public class VipClientMap : IMappingEntity<VipClient> { public void Map(EntityTypeBuilder<VipClient> builder) { builder.ForNpgsqlToTable("vip_clients", "clients"); builder.HasKey(entity => entity.Id); builder .HasOne(entity => entity.Client) .WithMany() .HasForeignKey("vip_client_id"); builder .Property(entity => entity.Comment) .HasColumnName("vip_client_comment") .IsRequired(); builder .Property(entity => entity.CreationTime) .HasColumnName("creation_time") .IsRequired(); } } 

When added to the database, such an exception is thrown. Imgur

There is a suspicion that the matter is in the mapping (I did not write)

  • Formulate a question. Your exception is not even readable in this picture. - koks_rs 2:55
  • I apologize. Exception text - "column" Id "of relation" vip_clients "does not exist" - waneksx

0