I am trying to create a web application where I can upload the image and see the uploaded images. The best option I was trying is to store the Images into SQL Server and Load It. How can I achieve this with the help of Entity Framework Core.
You need to save the image data in a Base64 string in the database and read it from DB then assign to
You can refer the below sample.
string imageData = @"data:image / jpeg; base64," + Convert.ToBase64String(File.ReadAllBytes(imgPath));
<img src=imageData />
You can save the images on the server also and read it from there. for this, you need to either disable CORS or allow the header/origin/method in EF Core project.