Return anonymous type results?

后端 未结 16 1593
梦毁少年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:38

    Just select dogs, then use dog.Breed.BreedName, this should work fine.

    If you have a lot of dogs, use DataLoadOptions.LoadWith to reduce the number of db calls.

提交回复
热议问题