Skip to content

Commit

Permalink
Fix Contributor List SQL
Browse files Browse the repository at this point in the history
  • Loading branch information
mickymcq committed Feb 19, 2024
1 parent c02f023 commit 6234126
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public async Task<IEnumerable<ContributorDTO>> ListAsync()
{
// NOTE: This will fail if testing with EF InMemory provider
var result = await _db.Database.SqlQuery<ContributorDTO>(
$"SELECT Id, Name, PhoneNumber_Number FROM Contributors") // don't fetch other big columns
$"SELECT Id, Name, COALESCE(PhoneNumber_Number, '') AS PhoneNumber FROM Contributors") // don't fetch other big columns
//.Select(c => new ContributorDTO(c.Id, c.Name, c.PhoneNumber?.Number ?? ""))
.ToListAsync();

Expand Down

0 comments on commit 6234126

Please sign in to comment.