This question is locked. New answers and comments are not allowed.
Hello guys,
There is my sample DB:
Sample code:
And an exception as its result:
As a workaround I can convert to an array products:
But it will be nice to know, are you going to support this?
Thanks, Ivan.
There is my sample DB:
CREATE TABLE Product(Id uniqueidentifier NOT NULL PRIMARY KEY, Name nvarchar(50) NULL)GOCREATE TABLE Shop(Id uniqueidentifier NOT NULL PRIMARY KEY, Name nvarchar(50) NULL)GOCREATE TABLE Product2Shop( ProductId uniqueidentifier NOT NULL FOREIGN KEY REFERENCES Product (Id), ShopId uniqueidentifier NOT NULL FOREIGN KEY REFERENCES Shop (Id),)Sample code:
class T{ internal class ProductData { public string Name; public IEnumerable<string> Shops; } static void Main() { var list = new TestEntityDiagrams().Products.Select( x => new ProductData { Name = x.Name, Shops = x.Shops.Select(z => z.Name), } ); foreach (var item in list) { Console.WriteLine("{0}: {1}", item.Name, string.Join(",", item.Shops)); } }}And an exception as its result:
Unhandled Exception: System.InvalidOperationException: An exception occured during the execution of 'Extent<Sample.Product>.Select(x => new ProductData() {Name = x.Name, Shops = x.Shops.Select(z => z.Name)})'. See InnerException for more details. ---> System.NotImplementedException: VisitParameter/Exec at Telerik.OpenAccess.Query.ExpressionCompiler.PerformDatabaseQueryImpl(Type type, Int32 elementAt, Object[] groupResolutionParamValues) at Telerik.OpenAccess.Query.ExpressionCompiler.PerformDatabaseQuery(Type type, Int32 elementAt, Object[] groupResolutionParamValues) --- End of inner exception stack trace --- at Telerik.OpenAccess.Query.ExpressionCompiler.PerformDatabaseQuery(Type type, Int32 elementAt, Object[] groupResolutionParamValues) at Telerik.OpenAccess.Query.ExpressionExecution.PerformDatabaseQuery[T](Piece`1 piece, Object[] grpVals)As a workaround I can convert to an array products:
new TestEntityDiagrams().Products.ToArray().Select( ...But it will be nice to know, are you going to support this?
Thanks, Ivan.