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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:24:53+00:00 2026-05-12T11:24:53+00:00

New to Subsonic 3.0 and wondering how to perform LIKE operators on object attributes.

  • 0

New to Subsonic 3.0 and wondering how to perform LIKE operators on object attributes. Given the following class, how would I perform a LIKE operation using Subsonic 3.0. For example SELECT * FROM categories WHERE name LIKE ‘%foo%’;

public class Category
{
    private String categoryID;
    private String name;

    public Category()
    {
        //  Do Nothing
    }

    public Category(String name)
    {
        this.Name = name;
    }

    public string CategoryID
    {
        get { return this.categoryID; }
        set { this.categoryID = value; }
    }

    public string Name
    {
        get { return this.name; }
        set { this.name = value; }
    }

}

  • 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-12T11:24:53+00:00Added an answer on May 12, 2026 at 11:24 am

    A better way to do it would be:

    return new SubSonic.Select().From(Categories.Schema)
       .Where(Categories.name).Contains("foo")
       .ExecuteTypedList<Categories>();
    

    This will use provider-specific wildcards. You can also use StartsWith and EndWith.

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

Sidebar

Related Questions

I am using subsonic, I'm reasonably new at it. Today is the first time
In SubSonic 3.04's SimpleRepository, I cannot seem to perform a Contains operation within a
Using Subsonic 2.1 I want to make my method call to results look like
I'm interested in using Subsonic 3.0 for developing a new ASP.Net MVC application that
In SubSonic, version 2.2, the following (MSSQL-specific) code fails: SqlQuery update = new Update(SomeTable)
I'm new to C# and Subsonic. I'm trying to solve the following case: public
I am using Subsonic3 and would like to get a Left Outer Join between
I'd like to achieve the following SQL statement with subsonic 2.2 SELECT Product.* FROM
I'm looking at using SubSonic 3 as my preferred OR mapper on a new
I am trying to convert the following SQL into Subsonic syntax using the SqlQuery

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.