public async Task <DAL.App.DTO.Person> FindForUserAsync(int id, int userId) { return(PersonMapper.MapFromDomain(await RepositoryDbSet.Include(p => p.AppUser) .FirstOrDefaultAsync(p => p.Id == id && p.AppUserId == userId))); }
public async Task <List <DAL.App.DTO.Person> > AllForUserAsync(int userId) { return(await RepositoryDbSet.Where(p => p.AppUserId == userId).Select(e => PersonMapper.MapFromDomain(e)) .ToListAsync()); }