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 4594028
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T22:46:12+00:00 2026-05-21T22:46:12+00:00

This is a follow-up of this question, however the context has changed. Breaking the

  • 0

This is a follow-up of this question, however the context has changed. Breaking the accepted solution.

This time I’m trying to use SubSonic, but it throws an errormessage using the previous accepted solution

System.NotSupportedException: The method 'get_Chars' is not supported
...
Line 36:             char[] nums = "0123456789".ToCharArray();
Line 37: 
Line 38:             var b = repository.GetAll().Where(q => nums.Contains(q.BrukerIdent[0])).ToList();
Line 39: 
Line 40: 

As far as I can tell q.BrukerIdent is a string. So I’m a bit thrown…

  • 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-21T22:46:13+00:00Added an answer on May 21, 2026 at 10:46 pm

    Forget LINQ – Don’t use it. There is a better way to accomplish your goal. Use SQL. You’d be done already if you would’ve just used SQL – it’s just a basic pattern search.

    Subsonic? Use a CodingHorror and use the appropriate SQL.

    CodingHorror is a class that is in the SubSonic assembly. It gives you a way to execute specific, hand-written SQL for instances where trying to achieve the same result with LINQ would be difficult if not impossible, and therefore a complete waste of time.

    You can also execute a CodingHorror query and ask it to give you the results as a list of your strongly-typed objects.

    Here’s a use of CodingHorror that should solve your problem, but you’ll have to fill in a couple of the particulars (table name, type name).

    var query = new CodingHorror(@"SELECT * FROM YourTableHere 
                                   WHERE BrukerIdent LIKE '[a-z0-9]%'");
    var matchingItems = query.ExecuteTypedList<YourTypeHere>();
    

    Also, there’s been a bit of an exodus from using SubSonic, and even larger ORM’s in general. I recommend looking at PetaPoco (or Massive or Dapper, etc.). The author of PetaPoco was driven by his experience of having to use CodingHorror far too often in projects that utilized SubSonic.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First of all, this is a follow-up question to Should I use WCF or
I know this question has been asked many times, but I am having trouble
This question follows on from a previous question. However stackoverflow presents me from commenting
This is a follow up question from Calling constructor in return statement . This
This is a follow up question to a previous question I asked about calculating
This is a follow-on question from the one I asked here . Can constraints
This is a follow-up question to ASP.NET How to pass container value as javascript
This is a follow-up question to this question I asked earlier. Btw thanks Neil
this is a follow-up question of mine. Suppose now I have a URL :
This is a follow-up question to the following if you would like to see:

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.