I'm working on asp.net mvc web application development, where I need to create a CSV file in-memory and send as attachment of email.
I had a look at this stack overflow solution below: Export C# List to Csv file
Unfortunately, this solution returns File Result and doesn't fit with my requirement.
Any help will be much appreciated.