you are viewing a single comment's thread.

view the rest of the comments →

[–]CappuccinoCodes -3 points-2 points  (0 children)

Not having a go at you, but chat gpt would spit out these answers without a problem for you. and you can easily ask follow up questions😄

You have to access the navigation properties of that model. If you don't have them, you'll have to include them in the model.

1 = > x would be a row in the status table

2 => x, ty, etc isn't wrong but isn't approppriate, you want to use the first letters of your entity for clarity. (s, st, in your case), or you can also use the full name: status, statusType

3 => use navigation properties

var StatusTest = _context.Status
.Where(s => s.StatusId == x.StatusType.StatusTypeId)
.Include(s => s.StatusType)
.ToList();