public string GetContributorNamesByRolePretty(ContributorRole role) { return(string.Join(", ", Contributors .Where(c => c.Role == role) .Select(c => c.Contributor.GetFullName())) .TrimEnd(new char[] { ',', ' ' })); }
public async Task <List <string> > GetSongCreateContritutorNamesByRoleAync(int songCreateId, ContributorRole role) { return(await _context.SongCreateContributors .Where(s => s.SongCreateId == songCreateId) .Where(s => s.Role == role) .Include(s => s.Contributor) .Select(s => $"{s.Contributor.Prefix} {s.Contributor.FirstName} {s.Contributor.LastName}, {s.Contributor.Credentials}".Trim(new char[] { ',', ' ' })) .ToListAsync()); }
public async Task <List <string> > GetSongCreateContritutorNamesByRoleAync(int songCreateId, ContributorRole role) { return(await _contributorRepository.GetSongCreateContritutorNamesByRoleAync(songCreateId, role)); }