I'm trying to insert a new [Shows]
record which has a 1-to-many relationship with [Performances]
through a WCF service call.
The [Shows]
record is created but the [Performances]
records aren't. No error is thrown. How can I have the performance records created also?
Client
Dim oShow As New Show With
{
'Properties here...
}
Dim cPerformances As New Collections.ObjectModel.Collection(Of Performance)
cPerformances.Add(New Performance With
{
'Properties here...
})
cPerformances.Add(New Performance With
{
'Properties here...
})
oShow.Performances = cPerformances
Dim myServiceRef As New myWCFService.ServiceName
myServiceRef.CreateShow(oShow)
Service
Dim ctx As New myEntities(ServiceURI)
ctx.AddToShows(oShow)
ctx.SaveChanges()