N
Nick
Hello,
I'm trying to figure out if I'm going to use LINQ on a new project and I've
got a dumb question. I ran sqlmetal against my database to generate the
classes I need. I setup a class (like an "entity access layer" class) to run
the actual queries. So I've got a method that returns a list of contacts:
public static IEnumerable<Contact> GetContacts
I've got a datagrid where I want to display the contacts, but I need to join
the contacts with another table (OtherData, for example). How can I do a join
and then return all of the data back from this method? Would I need to create
a class that contains all of the fields from the contacts and otherdata
classes (so I could have a method like below)?
public static IEnumerable<ContactsWithOtherData> GetContactsWithOtherData
I hope I'm making sense. Thanks for any help, I really appreciate it.
Thanks,
Nick
I'm trying to figure out if I'm going to use LINQ on a new project and I've
got a dumb question. I ran sqlmetal against my database to generate the
classes I need. I setup a class (like an "entity access layer" class) to run
the actual queries. So I've got a method that returns a list of contacts:
public static IEnumerable<Contact> GetContacts
I've got a datagrid where I want to display the contacts, but I need to join
the contacts with another table (OtherData, for example). How can I do a join
and then return all of the data back from this method? Would I need to create
a class that contains all of the fields from the contacts and otherdata
classes (so I could have a method like below)?
public static IEnumerable<ContactsWithOtherData> GetContactsWithOtherData
I hope I'm making sense. Thanks for any help, I really appreciate it.
Thanks,
Nick