Hello people, I hope everyone is well.
I have just started learning silverlight and retrieving data through Linq to SQL.
I have a problem with retrieving certain coulums from the table. I can retrieve through an object that retrieves all the columns but I don't want this. i managed to get a string of the columns I want but I cant reference the method from the client.....TIA.
Here is my code:
public class Service1 : IService1
{
public List<Contact> getNames()
{
DataClassesDataContext db = new DataClassesDataContext();
var names = from persons in db.Contacts
where persons.FirstName == "Gerhard"
select persons;
return names.ToList();
}
}
This works fine but I dont want every column.