c# - “column ”Id“ of relation ”vip_clients“ does not exist” exception -
i trying add data base vipclient.
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 add new vipclient db - “column ”id“ of relation ”vip_clients“ not exist” exception
i think problem in mapping
Comments
Post a Comment