dodge woo

dodge woo

  • 2.1k
  • 7
  • 158

view and post data EF core - no model

Jan 24 2022 8:03 AM

In MVC 2022 I create tables in the database by calling stored procedures the number of columns can vary, I would like too show them in a grid and save the cell data in a Submit -post. Is there a recommended way too do so without using 3rd party components? The tables dont have models.
 

   command.CommandText = "SELECT * FROM tableName";
    var reader = await command.ExecuteReaderAsync();

    DataTable LiveTab = new DataTable();
    LiveTab.Load(reader);
    return View(LiveTab);

 

 

 


Answers (1)