Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Unhandled Exception: System.InvalidOperationException: Multiplicity constraint violated. The role 'Student_Courses_Source' of the relationship 'Univer
- sity.Data.Student_Courses' has multiplicity 1 or 0..1.
- at System.Data.Entity.Core.Objects.EntityEntry.AddDetectedRelationship[T](Dictionary`2 relationships, T relatedObject, RelatedEnd relatedEnd)
- at System.Data.Entity.Core.Objects.EntityEntry.AddRelationshipDetectedByGraph(Dictionary`2 relationships, Object relatedObject, RelatedEnd relatedE
- ndFrom, Boolean verifyForAdd)
- at System.Data.Entity.Core.Objects.EntityEntry.DetectChangesInRelationshipsOfSingleEntity()
- at System.Data.Entity.Core.Objects.ObjectStateManager.DetectChangesInNavigationProperties(IList`1 entries)
- at System.Data.Entity.Core.Objects.ObjectStateManager.DetectChanges()
- at System.Data.Entity.Core.Objects.ObjectContext.DetectChanges()
- at System.Data.Entity.Internal.InternalContext.DetectChanges(Boolean force)
- at System.Data.Entity.Internal.InternalContext.GetStateEntries(Func`2 predicate)
- at System.Data.Entity.Internal.InternalContext.GetStateEntries()
- at System.Data.Entity.Infrastructure.DbChangeTracker.Entries()
- at System.Data.Entity.DbContext.GetValidationErrors()
- at System.Data.Entity.Internal.InternalContext.SaveChanges()
- at System.Data.Entity.Internal.LazyInternalContext.SaveChanges()
- at System.Data.Entity.DbContext.SaveChanges()
- at University.Client.Program.FillSomeData() in c:\MyStaff\11.DataBase\HOMEWORK\09.Homework-CodeFirst\University.Client\Program.cs:line 100
- 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