geniusvil

newMistake

Aug 27th, 2014
280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. Unhandled Exception: System.InvalidOperationException: Multiplicity constraint violated. The role 'Student_Courses_Source' of the relationship 'Univer
  2. sity.Data.Student_Courses' has multiplicity 1 or 0..1.
  3. at System.Data.Entity.Core.Objects.EntityEntry.AddDetectedRelationship[T](Dictionary`2 relationships, T relatedObject, RelatedEnd relatedEnd)
  4. at System.Data.Entity.Core.Objects.EntityEntry.AddRelationshipDetectedByGraph(Dictionary`2 relationships, Object relatedObject, RelatedEnd relatedE
  5. ndFrom, Boolean verifyForAdd)
  6. at System.Data.Entity.Core.Objects.EntityEntry.DetectChangesInRelationshipsOfSingleEntity()
  7. at System.Data.Entity.Core.Objects.ObjectStateManager.DetectChangesInNavigationProperties(IList`1 entries)
  8. at System.Data.Entity.Core.Objects.ObjectStateManager.DetectChanges()
  9. at System.Data.Entity.Core.Objects.ObjectContext.DetectChanges()
  10. at System.Data.Entity.Internal.InternalContext.DetectChanges(Boolean force)
  11. at System.Data.Entity.Internal.InternalContext.GetStateEntries(Func`2 predicate)
  12. at System.Data.Entity.Internal.InternalContext.GetStateEntries()
  13. at System.Data.Entity.Infrastructure.DbChangeTracker.Entries()
  14. at System.Data.Entity.DbContext.GetValidationErrors()
  15. at System.Data.Entity.Internal.InternalContext.SaveChanges()
  16. at System.Data.Entity.Internal.LazyInternalContext.SaveChanges()
  17. at System.Data.Entity.DbContext.SaveChanges()
  18. at University.Client.Program.FillSomeData() in c:\MyStaff\11.DataBase\HOMEWORK\09.Homework-CodeFirst\University.Client\Program.cs:line 100
  19. at University.Client.Program.Main(String[] args) in c:\MyStaff\11.DataBase\HOMEWORK\09.Homework-CodeFirst\University.Client\Program.cs:line 22
Advertisement
Add Comment
Please, Sign In to add comment