+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / LINQ to SQL Limitatons

LINQ to SQL Limitatons

2 posts, 1 answered
  1. H
    H avatar
    0 posts
    Registered:
    14 Mar 2017
    04 Apr
    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
    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