मुझे मिलता है: त्रुटि: अवैध कॉलम नाम 'संगठन संरचना_आईडी'।इकाई फ्रेमवर्क: अवैध कॉलम नाम 'संगठन संरचना_आईडी'
public OrganizationStructure()
{
ChildrenItems = new HashSet<OrganizationStructure>();
InputDate = DateTime.Now;
}
public int ID { get; set; }
public string Name { get; set; }
public virtual int? ParentID { get; set; }
public int OrganizationID { get; set; }
public int OrganizationTypeID { get; set; }
public int OrganizationActivityID { get; set; }
public int OrganizationLocationID { get; set; }
public string AddRemark { get; set; }
public int UserId { get; set; }
public DateTime InputDate { get; set; }
public int? RemAttr { get; set; }
public virtual ICollection<OrganizationStructure> ChildrenItems { get; set; }
सूचकांक कार्रवाई:
return View(_organizationStructureRepository.GetAll().ToList()
.Where(t => t.ParentID == null));
'संगठन संरचना' एक इकाई है (ईएफ से?) आपको क्या अपवाद है? – gideon
ईएफ, अपवाद: अमान्य कॉलम नाम 'संगठन संरचना_आईडी' –
कुछ बिंदु पर {entity} आईडी से {entity} _ID में स्वचालित स्वचालित कुंजी नाम बदल दिया गया है। ईएफ 5 शायद। –