Return anonymous type results?

后端 未结 16 1150
梦毁少年i
梦毁少年i 2020-11-22 03:01

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         


        
16条回答
  •  一生所求
    2020-11-22 03:48

    This doesn't exactly answer your question, but Google led me here based on the keywords. This is how you might query an anonymous type from a list:

    var anon = model.MyType.Select(x => new { x.Item1, x.Item2});
    

提交回复
热议问题