Hello,
public byte[] ImageData { get; set; }
In fact, it is not recommended to store images directly in a database.
This leads to the following two problems.
- A large amount of database storage space is increased, which affects the efficiency of CURD.
- Since the stored pictures are digitized, they are difficult to retrieve.
Therefore, when storing pictures, the images are usually stored in storage, and only the index of the pictures is recorded in the database.
In MAUI, you can refer to File system helpers to save the image to the file system, and the database will record the image storage path.
Best Regards,
Alec Liu.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.