You have a good start since you already loop through the images. Now inside the loop, save each image using an INSERT statement. In pseudo code
create sql connection
create sql command for insert
for each image
set bind variables for the command
execute the command
For storing images in SQL Server you have basically two options, either varbinary field or filestream. For using these fields, have a look at
How to store and fetch binary data into a file stream column[
^]
In general, when executing the statements you should use using blocks along with transaction and so on. For guidelines, refer to
Properly executing database operations[
^]