LINQ to SQL Limitatons
Hi all,
I just wanted some input on an issue I have encountered.
I am currently building a custom MVC widget. As part of this widget there is a query to the database to retrieve a dynamic module type.
My current query is
var collection = dynamicModuleManager.GetDataItems(articleType).Where(a => a.Status == Telerik.Sitefinity.GenericContent.Model.ContentLifecycleStatus.Live && a.Visible == true && Labels.PublicLabels.All(x => a.GetValue<IList<Guid>>("Public").Contains(x)));
I am trying to get all articles types that contain all labels in my Labels.PublicLabels guid list.
At runtime I get an exception relating to the database not being able to implement the query.
Any ideas would be greatly appreciated!
Thank you.
I posted the solution on StackOverflow:
stackoverflow.com/.../sitefinity-linq-to-sql-limitations
Thanks all.