We want to add a flag image to a
Country document and we want to store this image as an attachment. You will modify the
Country class and add a new property to hold the
FlagId value. Then you will add necessary code to store the attachment and modify a
Country document to populate the
FlagId property in order to refer the attachment. Once it is done, you will observe RavenDB logs to learn how RavenDB stores the attachment.
Country, and make it look like the following code snippet: