this is the code i used in my application but i am confused with the need of a ilist interface over here and the use of iqueryable. what are they exactly defined for?
private IList<Emp2> getcountry()
{
IList<Emp2> countryList = null;
using (CountryDataContext context = new CountryDataContext(ConnectionString))
{
IQueryable<Emp2> query = from c in context.Emp where c.EmpName=="ss"select c;
countryList = query.ToList();
}
return countryList;
}
They are both interfaces.
Interfaces in C#:
http://www.codeproject.com/Articles/18743/Interfaces-in-C-For-Beginners
http://www.codeproject.com/Articles/10197/The-Interface-Construct-in-C
msdn links:
http://msdn.microsoft.com/en-us/library/ms173156.aspx
http://msdn.microsoft.com/en-us/library/system.collections.ilist.aspx
http://msdn.microsoft.com/en-us/library/system.linq.iqueryable.aspx