久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  1. <i id='fSqd4'><tr id='fSqd4'><dt id='fSqd4'><q id='fSqd4'><span id='fSqd4'><b id='fSqd4'><form id='fSqd4'><ins id='fSqd4'></ins><ul id='fSqd4'></ul><sub id='fSqd4'></sub></form><legend id='fSqd4'></legend><bdo id='fSqd4'><pre id='fSqd4'><center id='fSqd4'></center></pre></bdo></b><th id='fSqd4'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='fSqd4'><tfoot id='fSqd4'></tfoot><dl id='fSqd4'><fieldset id='fSqd4'></fieldset></dl></div>
  2. <tfoot id='fSqd4'></tfoot>

        <bdo id='fSqd4'></bdo><ul id='fSqd4'></ul>

      <small id='fSqd4'></small><noframes id='fSqd4'>

      <legend id='fSqd4'><style id='fSqd4'><dir id='fSqd4'><q id='fSqd4'></q></dir></style></legend>

      使用實體框架將文件保存在數(shù)據(jù)庫中

      Save files in database with entity framework(使用實體框架將文件保存在數(shù)據(jù)庫中)
        <tbody id='nq3Qy'></tbody>
    1. <small id='nq3Qy'></small><noframes id='nq3Qy'>

            1. <i id='nq3Qy'><tr id='nq3Qy'><dt id='nq3Qy'><q id='nq3Qy'><span id='nq3Qy'><b id='nq3Qy'><form id='nq3Qy'><ins id='nq3Qy'></ins><ul id='nq3Qy'></ul><sub id='nq3Qy'></sub></form><legend id='nq3Qy'></legend><bdo id='nq3Qy'><pre id='nq3Qy'><center id='nq3Qy'></center></pre></bdo></b><th id='nq3Qy'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='nq3Qy'><tfoot id='nq3Qy'></tfoot><dl id='nq3Qy'><fieldset id='nq3Qy'></fieldset></dl></div>

              <tfoot id='nq3Qy'></tfoot>
                <bdo id='nq3Qy'></bdo><ul id='nq3Qy'></ul>
              • <legend id='nq3Qy'><style id='nq3Qy'><dir id='nq3Qy'><q id='nq3Qy'></q></dir></style></legend>
                本文介紹了使用實體框架將文件保存在數(shù)據(jù)庫中的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習吧!

                問題描述

                限時送ChatGPT賬號..

                我有一個基于 Entity Framework 和 Microsoft SQL Server 2008 的 ASP.NET MVC 解決方案.我需要創(chuàng)建一個函數(shù)讓我的用戶上傳文件.

                I have an ASP.NET MVC solution built on Entity Framework with Microsoft SQL Server 2008. I need to create a function that lets my users upload files.

                我想要的是:

                • 使用實體框架將文件存儲在數(shù)據(jù)庫中的解決方案
                • 一種通過某種哈希/校驗和檢測并防止兩次上傳同一文件的解決方案
                • 數(shù)據(jù)庫/表設(shè)計技巧

                推薦答案

                對"在 SQL Server 2008 數(shù)據(jù)庫中存儲文件的方法是 使用 FILESTREAM 數(shù)據(jù)類型.我不知道實體框架是否支持這一點,但您當然可以嘗試看看會發(fā)生什么.

                The "right" way to store a file in a SQL Server 2008 database is to use the FILESTREAM data type. I'm not aware that the Entity Framework supports that, but you can certainly try and see what happens.

                也就是說,大多數(shù)時候人們這樣做時,他們不會將文件存儲在數(shù)據(jù)庫中.這樣做意味著您需要通過 ASP.NET 和數(shù)據(jù)庫服務(wù)器來提供可以直接從 Web 服務(wù)器提供的文件.它還可能使您的數(shù)據(jù)庫和站點的備份圖片變得有些復(fù)雜.因此,當我們將文件上傳到我們的 MVC/Entity Framework 時,我們只存儲對數(shù)據(jù)庫中文件位置的引用,并將文件本身存儲在其他地方.

                That said, most of the time when people do this, they don't store the file in the database. Doing so means that you need to go through ASP.NET and the database server just to serve a file which you could be serving directly from the web server. It can also somewhat complicate the backup picture for your database and site. So when we upload files to our MVC/Entity Framework, we store only a reference to the file location in the database, and store the file itself elsewhere.

                顯然,哪種策略適合您在很大程度上取決于您的應(yīng)用程序的細節(jié).

                Obviously, which strategy is right for you depends a lot on the particulars of your application.

                這篇關(guān)于使用實體框架將文件保存在數(shù)據(jù)庫中的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                相關(guān)文檔推薦

                What are good algorithms for vehicle license plate detection?(車牌檢測有哪些好的算法?)
                onClick event for Image in Unity(Unity中圖像的onClick事件)
                Running Total C#(運行總 C#)
                Deleting a directory when clicked on a hyperlink with JAvascript.ASP.NET C#(單擊帶有 JAvascript.ASP.NET C# 的超鏈接時刪除目錄)
                asp.net listview highlight row on click(asp.net listview 在單擊時突出顯示行)
                Calling A Button OnClick from a function(從函數(shù)調(diào)用按鈕 OnClick)

                  <i id='uttAp'><tr id='uttAp'><dt id='uttAp'><q id='uttAp'><span id='uttAp'><b id='uttAp'><form id='uttAp'><ins id='uttAp'></ins><ul id='uttAp'></ul><sub id='uttAp'></sub></form><legend id='uttAp'></legend><bdo id='uttAp'><pre id='uttAp'><center id='uttAp'></center></pre></bdo></b><th id='uttAp'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='uttAp'><tfoot id='uttAp'></tfoot><dl id='uttAp'><fieldset id='uttAp'></fieldset></dl></div>

                    <bdo id='uttAp'></bdo><ul id='uttAp'></ul>

                          <small id='uttAp'></small><noframes id='uttAp'>

                          <legend id='uttAp'><style id='uttAp'><dir id='uttAp'><q id='uttAp'></q></dir></style></legend>
                            <tbody id='uttAp'></tbody>
                        • <tfoot id='uttAp'></tfoot>
                        • 主站蜘蛛池模板: 久久都是精品 | 永久免费看片在线播放 | 国产一区二区在线看 | 黄色福利 | 中文字幕无人区二 | 国产成人a亚洲精品 | www黄色| 国产免费久久 | 涩涩久久 | 黄色免费大片 | 欧美少妇视频 | 一区二区三区视频在线 | 久久国产成人 | 国产一区二区三区在线看 | 午夜精品久久久久久久99黑人 | 国产探花视频在线观看 | 簧片在线免费观看 | 久久av红桃一区二区小说 | 在线观看日韩视频 | 国产精品久久久久久中文字 | 久久99视频 | 日韩精品视频免费 | 永久免费看片在线播放 | 国产免费一级 | 亚洲成人毛片 | 欧美日本精品 | 操少妇视频 | 在线免费黄色网址 | 国产欧美日韩视频 | 国产a视频| 天天躁日日躁狠狠很躁 | 成人小视频在线观看 | 国产欧美日韩在线观看 | 伊人精品视频 | av九九| 四虎官网| 六月激情| 午夜影院在线免费观看 | 日本特级黄色片 | 69av在线| 天天干天天做 |