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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T02:12:18+00:00 2026-06-12T02:12:18+00:00

Hi all i have a Entity model ProdcutTable in my MVC4 WebApi application which

  • 0

Hi all i have a Entity model ProdcutTable in my MVC4 WebApi application which has the following column names

  [ProductID] [ProductName] [ProductDescritpion] [Price] [ImageURL] and so on

now i have to pass the price range as parameters
example

     frstvale=$200
     SecoundVal=$500

i have to retrive the [ProductID] [ProductName] [ProductDescritpion] [Price] [ImageURL] from the ProdcutTable for the selected price range how can i write the linq query for this at present i am retrieving all images from the table via a ajax call now i have to pass the paramaters for the price to my method and retrieve the records for the selected price range can any one help in writing the query for this

    this is my model


     public class Products
{
    public int ProductID { get; set; }
    public string ProductName{get;set;}
    public string ProductDescription { get; set; }
    public string ProductColor { get; set;}
    public string ProductSize { get; set; }
    public string Brand { get; set; }
    public int Price { get; set; }
    public string Department { get; set; }
    public string ImageURL { get; set; }
    public string DetailsURL { get; set; }
    public string Gender { get; set; }
    public string Firstvalue { get; set; }
    public string Lastvalue { get; set; }
}

this is how i am retrieving all my images

    private ProductsEntities products = new ProductsEntities();
     public IEnumerable<ProductTable> GetAllProdcuts()
    {
        return products.ProductTables.AsEnumerable();
    }
  • 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-12T02:12:19+00:00Added an answer on June 12, 2026 at 2:12 am

    you can use Where extension method that takes an expression as parameter to filter out the return objects.

    private ProductsEntities products = new ProductsEntities();
    public IEnumerable<ProductTable> GetAllProdcuts()
    {
        return products.ProductTables.Where(x=>x.Price>firstPrice && x.Price<secondPrice).AsEnumerable();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an Account entity which has all fields in UpdateCheck = Never except
I have two entities // All details has been removed @Entity @Table(name = "A_TABLE_NAME")
I have a form[method=get] which has a number of checkboxes all have the same
I have the following Entity Framework model: It's a very simple model and was
I have the following Entity model: public class Todo { [Required] public int ID
I have an entity in Domain Model. This entity has ChangeStatus(StatusesEnum newStatus) method. StatusesEnum
I have an Entity Framework model that has 3 tables (each with indentity primary
My situation I have an entity model with a base class ItemBase which defines
I have an existing SQL Database in which all tables have an ID column
I have a Entity model that includes a large number of lookup entities. All

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.