How to perform multiple field search in Entity Framework

saeed3164
 
on Apr 01, 2013 12:40 AM
8544 Views

hi

iam need multi search

i want when user Each of the fields can be filled in the picture below

Search results show the filling of fields

iam need this query with linq

search

 

 var Query = (from P in temp1.Vbuys
                         where P.Fage == Tage.text.trim()
                         select new { P.Tname, P.TFamil,P.Tage }).ToList();

 

Download FREE API for Word, Excel and PDF in ASP.Net: Download
Mudassar
 
on Apr 01, 2013 05:05 AM

This way

    protected void Button1_Click(object sender, EventArgs e)
    {
        ContactsDBEntities contactsDB = new ContactsDBEntities();
        var contacts = from Contact c in contactsDB.Contacts
                       where ((c.City == txtCity.Text || txtCity.Text == "") && (c.Country == txtCountry.Text || txtCountry.Text == ""))
                       select c;
    }