Using the simple example below, what is the best way to return results from multiple tables using Linq to SQL?
Say I have two tables:
Dogs: Name, A
You can not return anonymous types directly, but you can loop them through your generic method. So do most of LINQ extension methods. There is no magic in there, while it looks like it they would return anonymous types. If parameter is anonymous result can also be anonymous.
var result = Repeat(new { Name = "Foo Bar", Age = 100 }, 10);
private static IEnumerable Repeat(TResult element, int count)
{
for(int i=0; i
Below an example based on code from original question:
var result = GetDogsWithBreedNames((Name, BreedName) => new {Name, BreedName });
public static IQueryable GetDogsWithBreedNames(Func