This is the solution. I got this from my senior
List<enterpriseapplication> ReturnList = new List<enterpriseapplication>();
IEnumerable<enterpriseapplicationdata> UserApplications = dbContext.RegisterApps.ToList();
foreach (EnterpriseApplicationData UserApp in UserApplications)
{
EnterpriseApplication registerApp = new EnterpriseApplication { Id = UserApp.Id, Name = UserApp.Name, IsSubscribed=UserApp.Users.Any(u=>u.UserId==applicationUserId) };
ReturnList.Add(registerApp);
}
</enterpriseapplicationdata></enterpriseapplication></enterpriseapplication>