Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates #54

Open
wants to merge 6 commits into
base: pre
Choose a base branch
from
Open

Updates #54

wants to merge 6 commits into from

Conversation

a-frazier
Copy link

This is my series of updates to the pre branch.

  • Update NuGet Packages to latest versions
  • Protect against nulls: Return an empty file if handed a null API result, and add empty rows if there are null objects in a list of objects.
  • Only enumerate the API result once: This prevents triggering multiple SQL queries if handed a LINQ to SQL or Entity Framework result.
  • Add DateTimeOffsetSupport: All this does is attempt a naive conversion from DateTimeOffset to DateTime, so the resulting value can be serialized into Excel as a DateTime cell instead of a string.

Anthony Frazier and others added 6 commits January 26, 2016 14:18
Convert DateTimeOffset values to DateTime objects that EPPlus will support.
This conversion is not ideal, but is (for my purposes) generally more useful than stringified values.
Calling FirstOrDefault() on data before enumerating causes deferred expressions to be evaluated twice, which is especially troublesome if they cause queries to be sent to an SQL Server or have other side-effects.
…yValue<T>) From Throwing NullReferenceExceptions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant