Right now I am working on a simple website in ASP.NET MVC 4 using Entity Framework and want to be able to upload photos in the Create view. I have a table for storing data about the photos, including a ProductID.
What is the way of assigning a ProductID to the uploaded photos, when, at the time of the photo uploading, the product hasn't been created yet and thus I don't know it's ID?
Thank you!
EDIT: Just to clarify - I am saving the stuff about the photos as soon as they are uploaded, then I save the product and then I need to add the ProductID to each of the photos.