More in this section
Forums / Developing with Sitefinity / LINQ to SQL Limitatons

LINQ to SQL Limitatons

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 1 answered
  1. H
    H avatar
    0 posts
    Registered:
    14 Mar 2017
    04 Apr 2017
    Link to this post

    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.

  2. H
    H avatar
    0 posts
    Registered:
    14 Mar 2017
    06 Apr 2017
    Link to this post

    I posted the solution on StackOverflow: 

    http://stackoverflow.com/questions/43216184/sitefinity-linq-to-sql-limitations

     

    Thanks all.

    Answered
2 posts, 1 answered