我用 public async Task<IEnumerable<PersonResource>> GetPeople()
{
IEnumerable<PersonResource> people = await (from p in _db.People
select new PersonResource
{
Id = p.Id,
FirstName = p.FirstName,
LastName = p.LastName,
Age = p.Age,
Address = p.Address,
City = p.City,
StateAbbrev = p.StateAbbrev,
ZipCode = p.ZipCode,
Photo = p.Photo,
Interests = new List<string>()
}).ToListAsync();
foreach (PersonResource person in people)
{
person.Interests = (from iint in _db.Interests
join n in _db.PersonInterests on iint.Id equals n.InterestId
where n.PersonId == person.Id
select iint.InterestName).ToList();
}
return people;
// return Mapper.Map<List<Person>, List<PersonResource>>(people);
}
做成了UIViewController
。最初,当我对其进行仿真时,它运行良好。但是我决定要在底部添加一个UITableView
用作任务栏,但是,当我这样做时,该应用程序现在可以运行了,但没有出现UIView
。我尝试在没有任何限制的情况下运行,并且产生了相同的结果。
我做错了吗?