我有两个问题:
怎么了?
我的用户类:
public partial class User
{
public User()
{
this.dfcs = new HashSet<Dfc>();
this.fids = new HashSet<Fid>();
this.histroyDeliverRequests = new HashSet<Histroyrequest>();
this.histroyProposalRequests1 = new HashSet<Histroyrequest>();
}
public string Name { get; set; }
public string Role { get; set; }
public string Email { get; set; }
public string Group { get; set; }
public int Id { get; set; }
public short SoftwareVersion { get; set; }
public virtual ICollection<Dfc> dfcs { get; set; }
public virtual ICollection<Fid> fids { get; set; }
public virtual ICollection<Histroyrequest> histroyDeliverRequests { get; set; }
public virtual ICollection<Histroyrequest> histroyProposalRequests1 { get; set; }
public virtual Software Software { get; set; }
}
答案 0 :(得分:0)
我想你在插入用户表时应该省略Id,因为我认为在插入新记录时Id会自动递增?