I have an issue with next scheme, I attached it.I want to query from my database with only one object with "Manufacturer
" class. Like:
var res = new XPQuery<Manufacturer>(session);
And then query all info that are related to my condition in LINQ.
I have tried XPLiteObject, XPObject, Association attribute, NoForeignKey Attribute, XPOCollection
and a lot of stuff but nothing didn't help me.
I have tried a lot of approaches and every time I have new exception like: SelectMany - method is not supported. Can't set foreign key in table. Duplicate primary key.
My question is: how to describe classes for normal extraction data from db?
UPD: My solution now is: to use .ToList() at every object and then use linq-query for join data and make needed query.
var manufacturer = new XPQuery<Manufacturer>(session).ToList();
var cars = new XPQuery<Car>(session).ToList();
var countries = new XPQuery<Country>(session).ToList();
var result = from m in manufacturer ....