public byte[] GetAsCsv <T>(ICollection <T> collection) where T : class { Guard.NotNull(collection, nameof(collection)); var csvText = _formatter.Format <T>(collection); return(Encoding.GetBytes(csvText)); }
public async Task <byte[]> GetAgreementsAsCsv(long providerId) { var agreements = await GetCommitmentAgreements(providerId); return(_csvFormatter.Format(agreements)); }