I have a WebAPI. I need to return a list of ActivityRegisters
. We have a repository that does it like this:
public IQueryable<ActivityRegister> GetRegisters(int activityID)
{
return ActivityDBContext.ActivityRegisters.Where(x => x.ActivityID == activityID x.IsActive == true).OrderBy(x => x.ActivityRegisterID).AsQueryable();
}
However, there is a nullable column on the ActivityRegister
table called roomID
. There is a Rooms table but it is in a different database which we have a AdminDBContext
for. I need the API to return the roomName
in the payload which exists in the Admin DB. How can I get the above method to return the the roomName
using the roomID
? Thank you, I'm new and learning.