嗨,我在实体框架中有课这样: -
public partial class JLLContact : DomainEntity, IUniqueId
{
// Simple Props
public int? Record1ObjectTypeCode { get; set; }
public int? Record2ObjectTypeCode { get; set; }
public DateTime? CreatedOn { get; set; }
public string Email { get; set; }
public string Description { get; set; }
public bool IsActive { get; set; }
public int JLLContactId { get; set; }
public DateTime? ModifiedOn { get; set; }
public string Name { get; set; }
public string Title { get; set; }
public int? RoleLid { get; set; }
public int? BusinessLineLId { get; set; }
public int? RegionLId { get; set; }
public int? RelationScoreLId { get; set; }
public int? RelationStrengthLId { get; set; }
public int? Record1LId { get; set; }
public int? Record2LId { get; set; }
public bool? IsPrimary { get; set; }
public int? CountryLid { get; set; }
// UniqueId
public string __Id
{
get { return JLLContactId.ToString(); }
}
// Parents
public virtual ListItem Role { get; set; }
public virtual ListItem Region { get; set; }
public virtual ListItem Country { get; set; }
public virtual ListItem BusinessLine { get; set; }
}
当我尝试向DB添加此类型的条目时,出现错误。列名称“BusinessLine_ListItemId”,“Country_ListItemId”,“Region_ListItemId”无效。 显然他们指的是父母的财产。但我不明白这个问题。任何人都可以指出我正确的方向。
答案 0 :(得分:1)
答案在于实体地图文件。这些是我需要做出的改变:
view.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
}
});