This question is locked. New answers and comments are not allowed.
Hi,
I've just started using your OpenAccess tool which I've just purchased. Following your example in the documentation, I successfully completed defining my basic project with your OpenAccess tool error-free. Kudos to Telerik ORM team.
In the example that I followed, I created a simple LINQ query to return to the caller function all fields in the Products entity which is shown in the commented section in the code below. Next, I wanted to create a slightly more complex LINQ query that only selects certain fields (and, in my real project, I would need to join several tables/entities). That's when I faced problems. I search the internet and the discussions mention about problems with returning Anonymous type. This is a real need on my side (i.e. to be able to join tables and return selected fields only). Can you please help me?
I've just started using your OpenAccess tool which I've just purchased. Following your example in the documentation, I successfully completed defining my basic project with your OpenAccess tool error-free. Kudos to Telerik ORM team.
In the example that I followed, I created a simple LINQ query to return to the caller function all fields in the Products entity which is shown in the commented section in the code below. Next, I wanted to create a slightly more complex LINQ query that only selects certain fields (and, in my real project, I would need to join several tables/entities). That's when I faced problems. I search the internet and the discussions mention about problems with returning Anonymous type. This is a real need on my side (i.e. to be able to join tables and return selected fields only). Can you please help me?
public
IEnumerable<Product> LoadProductsByAgency(
int
AgencyId)
{
var p = (from c
in
this
.dbContext.Products
where c.Product_Agency == 1
select
new
{ProductName = c.ProductName,
ProductType = c.Product_ProductType,
Company = c.Product_Company}).ToList();
return
p;
//return this.dbContext.Products.Where((Products) => Products.Product_Agency == 1).ToList();
}