I am designing a simple image gallery that the user can set for album primary picture lets say similar to Facebook that user will be able to select the cover of the album from the pictures.
I believe that to achieve this I will need to add another bool column to Images table to call it IsCoverPicture. Then I will set this value for specific image to true. But later if they would like to change the cover image?
The way I do it is to set all value first to false and then set the new selected value to true.
Here I just wonder whether this is the correct way of doing this or is there any specific store procedure or anything by using Entity Framework that would handle this for me automatically when I set a new true value for the new cover picture it would take care of the rest for me and go and set the rest false?