Posted on: 9/16/2015 3:44:16 PM | Views : 846

I have code that successfully downloads the first file found in my query.
I want to download all files found in the query.
I know that it is only downloading one file because I am using db.QuerySingle.
How can I change this code to download all files found in my var selectedData?
I created the var file because running the code on selectedData gave me errors.
Should I place the file download code inside a foreach loop?
Here is my code:
@{ Layout = "~/_LayoutTLN.cshtml"; Page.Title = "TLN Newsletter"; var db = Database.Open("intranet"); int dayOfWeek = (int) DateTime.Now.DayOfWeek; DateTime lastMonday = DateTime.Now.AddDays(1- dayOfWeek).Date; string newsMonday; newsMonday = @lastMonday.ToString("yyyy-MM-dd"); var searchTerm = ""; var selectCommand = "SELECT * FROM JobBoard WHERE Newsletter LIKE ...

Go to the complete details ...