久久久久久久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í)體框架將文件保存在數(shù)據(jù)庫(kù)中

      Save files in database with entity framework(使用實(shí)體框架將文件保存在數(shù)據(jù)庫(kù)中)
        <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í)體框架將文件保存在數(shù)據(jù)庫(kù)中的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                問(wèn)題描述

                限時(shí)送ChatGPT賬號(hào)..

                我有一個(gè)基于 Entity Framework 和 Microsoft SQL Server 2008 的 ASP.NET MVC 解決方案.我需要?jiǎng)?chuàng)建一個(gè)函數(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í)體框架將文件存儲(chǔ)在數(shù)據(jù)庫(kù)中的解決方案
                • 一種通過(guò)某種哈希/校驗(yàn)和檢測(cè)并防止兩次上傳同一文件的解決方案
                • 數(shù)據(jù)庫(kù)/表設(shè)計(jì)技巧

                推薦答案

                對(duì)"在 SQL Server 2008 數(shù)據(jù)庫(kù)中存儲(chǔ)文件的方法是 使用 FILESTREAM 數(shù)據(jù)類型.我不知道實(shí)體框架是否支持這一點(diǎn),但您當(dāng)然可以嘗試看看會(huì)發(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.

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

                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)用程序的細(xì)節(jié).

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

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

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

                相關(guān)文檔推薦

                What are good algorithms for vehicle license plate detection?(車牌檢測(cè)有哪些好的算法?)
                onClick event for Image in Unity(Unity中圖像的onClick事件)
                Running Total C#(運(yùn)行總 C#)
                Deleting a directory when clicked on a hyperlink with JAvascript.ASP.NET C#(單擊帶有 JAvascript.ASP.NET C# 的超鏈接時(shí)刪除目錄)
                asp.net listview highlight row on click(asp.net listview 在單擊時(shí)突出顯示行)
                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>
                        • 主站蜘蛛池模板: 精品国产一区二区在线 | 免费的黄色片子 | 欧美专区在线 | 涩涩视频在线观看 | 国产一区二区视频免费在线观看 | 精品国产一区二区三区久久久久久 | 国产在线观看福利 | 国产成人精品免高潮在线观看 | 国产日韩精品视频 | 成人永久免费视频 | 亚洲日本一区二区 | 国产成人精品久久二区二区91 | 国产黄色在线观看 | 日韩欧美专区 | 中文字幕日本一区二区 | 国产高清不卡 | 欧美一区二区三区在线观看视频 | 成人在线亚洲 | 男女羞羞视频免费看 | 九九精品网 | 久久久久无码国产精品一区 | av大片在线观看 | 国产精品成人国产乱一区 | 日韩成人在线一区 | 国产精品久久久久久亚洲调教 | 在线午夜 | 久久99精品久久久久久国产越南 | 国产一区二区精品 | 精产国产伦理一二三区 | 蜜臀久久99精品久久久久野外 | 国产欧美日韩一区 | 毛片免费看的 | 日本三级做a全过程在线观看 | www.久久久久久久久久久 | 国产九九九九 | caoporn免费 | 免费性视频 | 三级在线观看 | 欧美成人精品激情在线观看 | 国产激情毛片 | 国产精品成人一区二区 |