I have two database tables: an item table and an Image table. I want to be able to save and fill in the item details from the edit form which contains a file upload to upload images of the item.
I'm using dapper and I have no issues saving my item data. i as well have no issue uploading files to my server project.
[Required]
public int ItemIDNumber { get; set; }
[Required]
public string? ItemName { get; set; }
[Required]
public string? ItemDescription { get; set; }
but I'd want to be able to get back the saved itemID number which is an increment int generated automatically by the database so I can use it to save each image upload data in the database.
[Required]
public int ItemIDNumber { get; set; }
[Required]
public string? ImageName { get; set; }
[Required]
public string? ItemURL { get; set; }
1.How can I get image names and URLs when uploaded
2. How can I get back the itemIDnumber so I can use it for the image table ?
3. i want to get this done by clicking on submit on the edit form.