Linq Insert not saving RRS feed

  • Question

  • I have a test database with ASP .Net membership setup along with my own tables (Customers, Products). I write the below code and although i can see the data coming into the class it doesnt save any changes to the database. Ive stripped out everything to narrow it down but wondered if theres a way to see whats happening behind the scenes as in why the data is not saved? I did have console.write (ctx.Log) but that was "Nothing". Heres the insert code:

        Public Sub AddCustomer(ByVal UserID As System.GuidByVal Name As StringByVal Surname As String)
            Dim c As New Customer
            Dim ctx As New TestDbDataContext
            c.CustomerID = UserID
            c.CustomerFirstName = Name
            c.CustomerSurname = Surname
        End Sub

    Thanks in advance for any help.

    Monday, December 17, 2012 12:48 PM


All replies