17.07.2015 Views

The Art of SQL Server FILESTREAM - Red Gate Software

The Art of SQL Server FILESTREAM - Red Gate Software

The Art of SQL Server FILESTREAM - Red Gate Software

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 4: <strong>FILESTREAM</strong> with Entity Framework and LINQ to <strong>SQL</strong>Neither <strong>of</strong> these frameworks is ideal for working with <strong>FILESTREAM</strong> data. Both EF andLINQ to <strong>SQL</strong> use the T-<strong>SQL</strong> interface to access the <strong>FILESTREAM</strong> data by default. Thismeans that the performance benefits <strong>of</strong>fered by the streaming APIs are not available toapplications that use these frameworks "out <strong>of</strong> the box" to access the <strong>FILESTREAM</strong> data.Performance may be really bad if the application performs a huge volume <strong>of</strong> <strong>FILESTREAM</strong>operations using the native <strong>FILESTREAM</strong> mappings <strong>of</strong> either <strong>of</strong> these frameworks.We demonstrated an approach using EF (but that is equally valid for LINQ to <strong>SQL</strong>) thatuses specialized code in order to use the technology in conjunction with streaming accessto <strong>FILESTREAM</strong>.164

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!