This question is locked. New answers and comments are not allowed.
Database relation Image
my code:
my code:
DataServices.HRMPerson p = new DataServices.HRMPerson(); |
p.PersonId = Guid.NewGuid(); |
p.Name = "shane"; |
HRMAffairCollection ef1 = new HRMAffairCollection(); |
ef1.AffairCollectionId = Guid.NewGuid(); |
DataServices.HRMFeature d = new DataServices.HRMFeature(); |
d.FeatureId = Guid.NewGuid(); |
d.BloodType = "b"; |
ef1.HRMFeature = d; |
p.HRMAffairCollection = ef1; |
dwcf.CreateHRMPerson(p); |
error info:
Insert of '660258325-b07df7a9-756f-4b1f-9158-c608a9c90551' failed: Telerik.OpenAccess.RT.sql.SQLException: INSERT 语句与 FOREIGN KEY 约束"FK_HRM_Feature_HRM_Person"冲突。该冲突发生于数据库"HRMTest",表"dbo.HRM_Feature", column 'FeatureId'。
语句已终止。
在