Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6677815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:10:07+00:00 2026-05-26T04:10:07+00:00

I am stuck in somewhere on my ASP.NET MVC 3 app. here is the

  • 0

I am stuck in somewhere on my ASP.NET MVC 3 app. here is the error I am getting :

The specified type member ‘AccommPropertyTags’ is not supported in
LINQ to Entities. Only initializers, entity members, and entity
navigation properties are supported.

I have found how we can solve this on following article :

Only initializers, entity members, and entity navigation properties are supported

But mine is a little bit odd.

Here is one of the partial class of my entity :

[MetadataType(typeof(AccommPropertyWebDetail.MetaData))]
public partial class AccommPropertyWebDetail {

    public virtual ICollection<string> AccommPropertyTags {

        get {

            return Helpers.AccommPropertyTag.CreateStringListFromString(this.PropertyTags);
        }
    }

    private class MetaData {

        [Required, StringLength(50)]
        public string Category { get; set; }

    }
}

As you can see above, AccommPropertyTags property is typeof ICollection<string>. What I am trying inside my controller is as follows :

public ViewResult Tag(string tag) {

    var _rawTag = HttpUtility.UrlDecode(tag);

    ViewBag.Tag = _rawTag;

    var model = _accommpropertyrepo.GetAllAccommPropertiesFullWebIgnoringApprovalStatus();

    model = model.Where(
            x => x.AccommPropertyTags.Any(
                    y => y == _rawTag
                )
        );

    return View(model);
}

Because of the fact that I am using Any there, Entity is trying to convert my AccommPropertyTags property to SQL and cant because it’s not part of the table schema.

Am I really stuck here or is there a cool way of beating this annoying error?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T04:10:08+00:00Added an answer on May 26, 2026 at 4:10 am

    Your problem is similar to the question you have linked. Call model.ToList() before using Where. This will force EF to materialize entities and then apply the rest of the filtering in memory.

    public ViewResult Tag(string tag) {
    
        var _rawTag = HttpUtility.UrlDecode(tag);
    
        ViewBag.Tag = _rawTag;
    
        var model = _accommpropertyrepo.GetAllAccommPropertiesFullWebIgnoringApprovalStatus();
    
        var result = model.ToList().Where(
                x => x.AccommPropertyTags.Any(
                        y => y == _rawTag
                    )
            );
    
        return View(result);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am stuck and am getting an error somewhere within my C code, and
Got stuck here: http://jsfiddle.net/UFkg8/ Right now the animation is top-down. What do I need
I'm trying to understand ASP.Net MVC at a lower level. Specifically, I'm trying to
I'm using a masterpage in my ASP.NET MVC project. This masterpage expects some ViewData
I am stuck with asp.net post issue with last 2 weeks. Scenario: My application
I'm getting stuck somewhere (as newbies do). Is it ok to re-define a variable
I have some terribly written ASP.NET code that is just not working right (go
I've been testing my application and got stuck into error that does not seem
Somewhere here on Stack Overflow, I had found the following code some day which
Kinda stuck here... I have an application with lets say 5000 rows of data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.