Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7765463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T15:10:21+00:00 2026-06-01T15:10:21+00:00

When i want to store a file in a filestream column, i always need

  • 0

When i want to store a file in a filestream column, i always need to read the whole binary into the memory:

using (MemoryStream memoryStream = new MemoryStream())
{
   sourceStream.CopyTo(memoryStream);
   binaryStore.Content = memoryStream.ToArray(); //Content = filestream column
}

is there a way with the entity framework, to put the stream directly? Because, if i want to upload a large file, i get a OutOfMemoryException.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T15:10:22+00:00Added an answer on June 1, 2026 at 3:10 pm

    Didn’t see any update about FILESTREAM support in EF. (Mentioned before as partial support with .net 3.5 sp1 release here). I suppose entity framework is accessing FILESTREAM through TSQL and apparent that you will not be able to get the streaming performance benefits of FILESTREAM. (need to read all file content into memory)

    So, the recommended approach is using with SqlFileStream .Net API.

    http://lennilobel.wordpress.com/2011/08/22/using-sqlfilestream-in-c-to-access-sql-server-filestream-data/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

how to store file contents to iphone's internal memory using xcode ? I want
I want to store strings in a binary file, along with a lot of
I have semicolon-separated .dat file and I want to read that file and store
I want to translate a frontend Magento store using only one csv file. So
i want to store pdf file in local and read it . i want
i store doc file into sql server data base i want view this file
I want to create a binary file and store string data in it, I
I want to read an XLSX file into XML and the pass this XML
I want to store images into sql using c# application. So I have this
I'm trying to read data in from a binary file and then store in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.