locked
how to pass criteria (condition ) to linq statement RRS feed

  • Question

  • how to pass criteria (condition ) to linq statement
    Wednesday, February 12, 2014 7:32 AM

Answers

  • Hi dear..

    You should try this

    var cellphoneprice = from phone in cellphones
                                    where phone.price <= 40000
                                    select new
                                    {
                                        Model = phone.Model,
                                        Company = phone.CompanyName,
                                        Price = phone.price
                                    };

    and check my article about LINQ  here

    http://www.coderex.org/deep-dive-linq/

    If it is helpful please mark as answer :-)

    Wednesday, February 12, 2014 7:46 AM

All replies