Hello.
I have a table in db:
Id, title, imageurl
In add view I get IFormFile for image url and get the relative path and save image url it is ok but in edit view I want to edit this record and I want to save new image url if user select a new image or save old imageurl if user leave image blank.
If I use db.ImagesTable.Update(myviewmodel);
If user does not select a new image it will fill the imageurl with null value.
Can anyone help me to know how can I set this field required in add view and optional in edit view that if user does not select image in edit view automatically fill this field with old value?