Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3333958
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T23:51:10+00:00 2026-05-17T23:51:10+00:00

Our users need to be able to export data in CSV format, edit some

  • 0

Our users need to be able to export data in CSV format, edit some of the records, and upload the data again. The data does not map to entities, you could say that the object graph is flattened to fit in the Excel-based workflow.

Right now this happens in the controllers because I thought these DTO classes were view models. It smells but I don’t have a clear idea how to fix that. Is there a pattern I could/should follow?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T23:51:10+00:00Added an answer on May 17, 2026 at 11:51 pm

    Start by abstract this logic into an interface containing the necessary method. Implement this interface against the CSV format. Pass the interface in the constructor of the controller. Use DI to inject the proper implementation. In the controller action call the method on the interface.

    If you want to return CSV directly from your controller action you could write a custom ActionResult like CsvActionResult which will take the model and serialize it into CSV so that in your controller action you return new CsvResult(someModel).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form in HTML where our users fill in the data and
We have are relatively simple Reporting Services report that our users commonly export to
We have some files on our website that users of our software can download.
I want to find a way to allow our reporting guy to export data
I need to get a log of user access to our SQL Server so
The need arose, in our product, to determine how long the current user has
Our users have created MS-Excel spreadsheets which over time have evolved into fairly complex
I'd like to encourage our users of our RCP application to send the problem
We have a SQL Server 2005 database, and currently all our users are connecting
We have a simple registration form for our website users where we only require

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.