LINQ to SQL Limitatons

Posted by Community Admin on 04-Aug-2018 16:21

LINQ to SQL Limitatons

All Replies

Posted by Community Admin on 04-Apr-2017 00:00

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.

Posted by Community Admin on 06-Apr-2017 00:00

I posted the solution on StackOverflow: 

stackoverflow.com/.../sitefinity-linq-to-sql-limitations

 

Thanks all.

This thread is closed