question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CsvDataReader missing GetRecords<T>()

See original GitHub issue

There is probably something missing on my part but I can’t seem to find the issue.

I’ve imported the Sylvan.Data.Csv package into a Blazor server application at the latest version (1.2.6-b0002), while following the data binding example I’m trying to parse a document into a model but the reader appears to be missing the GetRecords<T>() method, I do have access to GetRawRecord and GetRawRecordSpan methods. I’m also using both Sylvan.Data and Sylvan.Data.Csv namespaces but the first one isn’t being used.

This is my method:

var opts = new CsvDataReaderOptions() { Schema = CsvSchema.Nullable };
using var reader = CsvDataReader.Create(path, opts);
var tags = reader.GetRecords<Tag>();

I’m sorry if this is an obvious fix but I can’t seem to jump over this wall.

Issue Analytics

  • State:closed
  • Created 7 months ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
MarkPflugcommented, Feb 9, 2023

@Hugo-Matias If you find the libraries useful give them a star, helps other people find them.

0reactions
Hugo-Matiascommented, Feb 9, 2023

That was it, when I installed the package it just installed that specific library and I assumed it installed the other dependencies as well. Thanks for following the issue in such a quick response. Cheers and thanks for the library as well!

Read more comments on GitHub >

github_iconTop Results From Across the Web

GetRecord return values but csvDatareader says "no ...
The issue with datatable is that it returns null although I am able to get ercord using GetRecords().
Read more >
No header record was found when parsing with CSV Helper
When I upload the file, it is there. But when the GetRecords runs, I get the error. Thank you for any help. This...
Read more >
Ignoring Properties | CsvHelper
When you use auto mapping in your class map, every property will get mapped. If there are properties that you don't want mapped,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found