vb.net - Querying many to many relationship -


I'm really stuck and need help. I think every article is in C # and VB.NET A solution is needed in

I am using EF 6.0 with database first model. Let me use the classic customer product scenario to display my position. In my database, I have three tables, customers, products and customer products. Look at this link as it is exactly my own.

After I generated my model from the database, my unit model diagram reveals that CustomerProduct has disappeared in accordance with expectations and many relationships between models reveal for many customers and the product also customer of the product And customers with the navigation properties of the product are expected.

All I want to do is find a customer related product pulling out some data from both tables ie CustName and ProductName

The SQL I'll use. Please select c < C.CustomerId = 101

To know the address data in a query, do not know how to use the shipping property. Can I help anyone?

Thank you in advance ^ _ ^

You can include them and then them Entities access through the property in the classroom.

  dim query = model.User.Include ("address"). Include ("UserAddressLink") Where (function (o) o.UserId = 101). FirstOrDefault is not a query then there is nothing then the dim houseNumber = query.Address.HouseNo 'uses the navigation property end  

Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -