views:

7

answers:

0

I tried following the example from MDSN: link text

Here are the snidbits from my save method to add a new car to a currentuser:

     Private Function SaveMe(Optional ByVal pCar As Car = Nothing) As Boolean
Using ctx As New NTEntities()
            CurrentUser = aspnet_Users.GetLoggedInUser

            'Must take care of New and Updates
            Dim oCar As Car
            If pCar Nothing Then
                oCar = New Car
            Else
                oCar = pCar 
            End If

'Get the values from the form for the car

            If pCarIs Nothing Then
                CurrentUser.Car.Add(oCar)
            End If
            Dim Saved As Boolean = ctx.SaveChanges()

However, Save Changes is returning false? Any ideas?