Insert image with query into Entity Framework Database in ASP.Net

Last Reply one year ago By Shashikant

Posted one year ago

i have these table: 

CREATE TABLE [dbo].[Images] (
    [Id]           INT             IDENTITY (1, 1) NOT NULL,
    [Name]         NVARCHAR (MAX)  NULL,
    [ContentType]  NVARCHAR (MAX)  NULL,
    [Data]         VARBINARY (MAX) NULL,
    [Base64String] NVARCHAR (MAX)  NULL,
    CONSTRAINT [PK_dbo.Images] PRIMARY KEY CLUSTERED ([Id] ASC)
);

Can you help me how to write query to insert image?

You are viewing reply posted by: Shashikant one year ago.
Posted one year ago Modified on one year ago

Please refer below article

Select Insert Edit Update and Delete in GridView using Entity Framework in ASP.Net

also you dont need to Save base64String,as you are saving Data(bytes)

I hope this will help you out.

 

I agree, here is the link: https://www.e-iceblue.com/Introduce/spire-office-for-net-free.html