Skip to content

Instantly share code, notes, and snippets.

@NehemiahLimo
Last active April 29, 2020 10:39
Show Gist options
  • Save NehemiahLimo/8b06a331742a67ad51a2dfd89f7457f1 to your computer and use it in GitHub Desktop.
Save NehemiahLimo/8b06a331742a67ad51a2dfd89f7457f1 to your computer and use it in GitHub Desktop.
https://www.compilemode.com/2017/01/downloading-files-from-database-in-asp-net-mvc.html
private List<FileDetailsModel> GetFileList()
{
List<FileDetailsModel> DetList = new List<FileDetailsModel>();
DbConnection();
con.Open();
DetList = SqlMapper.Query<FileDetailsModel>(con, "GetFileDetails", commandType: CommandType.StoredProcedure).ToList();
con.Close();
return DetList;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment