I have a UWP app and I want to display images, but those images have to be saved in the database, I don't want to use a storage URL, I want to not de-serialize them, upload them serialized to the database and fetch and de-serialize them. I just don't know what type of field to use and what can be serialized.
If you use one you
webapi
could send the serialized image tobase64
, using something like thisthen by having the image string you could put it as part of the json that you send when invoking the webapi
On the webapi side you would use
to have the byte array that you would use in the parameter of the INSERT that you would make in the db (or in the property of the class if you use entity framework)
If you use any library to serialize how to be you
json.net
could apply something like thisHow do I Serialize object to json using json.net which contains an image property
basically it is a converter class that tells you in the serialization how to treat the image property
you use it in class