Eager Loading from more than 1 table

Hi All,

Created a table called SMSC. This table have following fields:
ID, Name, IP, ClusterId and RoleId.

When displaying SMSCs list I need to Eager load information from Role and Cluster tables. Each table containing ID and Name fields.

I know how to do eager load information from one table, need your help to do that from both tables.

Thanks in advance.

Regards Yossi

context.Smscs
   .Include(s => s.Role)
   .Include(s => s.Cluster)
   .ToList();

Thanks a lot for that.

Regards

Yossi

בתאריך יום ב׳, 18 בינו׳ 2021, 20:31, מאת SAM via Code with Mosh Forum ‏<codewithmosh@discoursemail.com>: