Select from following answers:- Add the following line of code to the method: File.WriteAllBytes(targetFilePath, imageEntity.ImageData.ToArray());

- Modify ImageEntity to implement ISerializable. Modify the method to call the BinaryFormatter to deserialize to the image file.
- Add the Serializable attribute to the ImageData property. Modify the method to call the BinaryFormatter to deserialize to the image file.
- All Above
Use the ToArray method of the Binary column type to write out to a file. This method returns the varbinary(max) mapped column as an array of bytes.
Attempting to cast the varbinary(max) mapped column as an array of bytes will throw an exception. The ToArray method must be called.
Show Correct Answer
Source: MeasureUp.Com | |
Alert Moderator