simple-odata-client / Simple.OData.Client

MIT License
330 stars 196 forks source link

Insert/Update not working with EF Many to Many using simple odata client How do I do it? #256

Open ashuthinks opened 8 years ago

ashuthinks commented 8 years ago

My context is

In above we have not added DbSet for UserRole if we add that it will work fine.

Using this model via Entity Framework code 1st, data table in database becomes =>

1) User Table

2) Role Table

3) UserRole Table - A new linked table created automatically

Model for User is =>

Model for Role is =>

and my O Data query for inserting record for single User/Role table working properly

Now, what query should I write, when I want to Insert record to UserRole table

can someone have any idea

object commented 8 years ago

Hi and sorry for the late response.

I will investigate this further but I am currently under a heavy load of other tasks, so if will help me a lot if you figure out what OData payload you expect to be generated. Don't think EF and SQL: OData has its own protocol which is not equivalent to SQL and LINQ so not everything can be supported by OData. So listing expected OData behavior is appreciated, it will save me some time to investigate it further.