Reputation: 1798
Does this insert sql statement
have a equivalent using linq to sql
or how to write the insert in linq to sql
?
INSERT INTO Table(FileId, FileTitle, Action, FileAsBinary, UploadDate)
Values(NEWID(), 'Hello World Title', 'Upload',(
SELECT * FROM OPENROWSET(
BULK 'C:\Files\Docs\TestDoc.docx',
SINGLE_BLOB) AS x), GetDate())
Upvotes: 0
Views: 96
Reputation: 9329
No you have to write a few lines of code to achive this. The Linq to Sql is just a light ORM for MSSQL.
Upvotes: 1