Im setting up an OData provider in visual studio. The error that im receiving really doesnt have anything to do with OData side of things.
I have a table type in my ado entity data model and whenever I try to insert a record into this table i get the following error:
{"The member with identity 'ReturnValue' does not exist in the metadata collection. Parameter name: identity"}
This is the stacktrace:
at System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter) at System.Data.EntityClient.EntityAdapter.Update(IEntityStateManager entityCache) at System.Data.Objects.ObjectContext.SaveChanges(SaveOptions options) at System.Data.Objects.ObjectContext.SaveChanges() at OData.CreateWorkOrder(Int32 CreatedByContactID) in D:\Web\OData.svc.vb:line 31
Has anyone heard of this error? I can insert fine into any other table it just seems to be this one table that the ado entity data model doesnt want to play with.
Thanks in advance
''# this comment is just here because the code formatter doesn't play nice otherwise.
<WebGet()> _
Public Function CreateWorkOrder(ByVal CreatedByContactID As Integer) As WorkOrder
Dim x As New MyAppEntities
Dim wo As WorkOrder = MyApp.WorkOrder.CreateWorkOrder(Nothing, 100, 4, False, DateTime.Now, False, 0, 1, 0, 0, 0, 0, 0, 0, False, 0, 0, 0, False, CreatedByContactID, DateTime.Now, 1, DateTime.Now)
x.AddToWorkOrders(wo)
x.SaveChanges()
Return wo
End Function