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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:05:04+00:00 2026-06-15T20:05:04+00:00

This must be simple and I’m being incredibly dense but I can’t find an

  • 0

This must be simple and I’m being incredibly dense but I can’t find an example to help me figure it out. I want to filter my list of tblAsset items by their assessmentId which is passed in through a parameter. I’m able to get the parameter value ok, but I’m not sure how to write the query.

My model is built from an existing Database using the Model creation wizard.

Thanks for any help!

public IEnumerable<tblAsset> GettblAssets()
{
  NameValueCollection nvc = HttpUtility.ParseQueryString(Request.RequestUri.Query);
  var assessmentId = nvc["aid"];

  //limit the assets by assessmentId somehow and return
}
  • 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-06-15T20:05:05+00:00Added an answer on June 15, 2026 at 8:05 pm

    You could use the .Where extension method on the IQueryable<tblAsset> instance returned by your database:

    public IEnumerable<tblAsset> GettblAssets()
    {
        NameValueCollection nvc = HttpUtility.ParseQueryString(Request.RequestUri.Query);
        var assessmentId = nvc["aid"];
    
        // TODO: you might need to adjust the property names of your model accordingly
        // Also if the assessmentId property is an integer on your model type
        // you will need to parse the value you read from the request to an integer
        // using the int.Parse method
        return db.tblAsset.Where(a => a.assessmentId == assessmentId);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This must be simple, but I can't seem to figure it out. I am
This must be quite simple but I can't seem to figure this out. I've
This must be a simple fix, but I just can't figure it out! I
This must be simple, but I am not able to figure out. I want
This must be a simple problem but i can't figure out why it's not
I'm sure this must be simple, but I can't figure out how to word
I know this must be very simple. But I can't figure it out. I
This must be very simple. But I just can't seem to find the proper
This must be so simple, but I can't find it: How do you restore
I must be missing something very simple, but can't find the answer to this.

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.