主頁 > .NET開發 > 【.NET框架】—— MVC5+EF進行CRUD(一)

【.NET框架】—— MVC5+EF進行CRUD(一)

2020-09-09 22:53:25 .NET開發

1.1.MVC5+EF6配置環境

1.1.1.什么是Entity Framework

EF框架:EF全稱Entity Framework,是微軟官方發布的ORM框架,它是基于ADO.NET的,通過EF可以很方便地將表映射到物體物件或將物體物件轉換為資料庫表,

ORM:ORM是將資料庫存盤從域物件自動映射到關系型資料庫的工具,ORM主要包括3個部分:域物件、關系資料庫物件、映射關系,ORM使類提供自動化CRUD,使開發人員從資料庫API和SQL中解放出來,

簡單來說,在SQL Server中每一條記錄就是一個物體記錄,在C#中每一個實體化的物件就是一個物體,通過EF框架可以很輕松地實作資料庫的操作和連接,

1.1.2.EF運行環境

Entity Framework框架曾經是.NET Framework的一部分,但Version 6之后,從.NET Framework中分離出來,其中EF5由兩部分組成:EF API和.NET Framework 4.0/4.5,而EF6是獨立的Entity Framework.dll,不依賴.NET Framework,使用NuGet即可安裝EF,在安裝VS 2017開發環境時,會自動安裝EF5.0和6.0版本,

 

這里我們還是使用NuGet程式管理包進行專案EF環境的安裝:

①使用工具—>NuGet包管理器—>管理解決方案的NuGet程式包,瀏覽中搜索EntityFramework,需要安裝如下兩個包:

 

 

 

 

②安裝完成之后需要創建用戶背景關系檔案UserContext類,一般放于專案Models檔案夾下:

UserContext類:

//創建一個UserContext背景關系連接類,繼承DbContext,使用name關聯Web.config中的連接陳述句
    public class UserContext : DbContext
    {
        public UserContext() : base("name=SqlConnString")
        {

        }
    }

③在Web.config檔案中做如下配置:

<connectionStrings>
    <add name="SqlConnString" connectionString="server=DESKTOP-3POL04N;database=db_news;uid=sa,pwd=******"/>
  </connectionStrings>

 

 以上三步即完成了EF框架運行環境的簡單搭建,關聯到了資料庫

1.2.MVC5+EF6 Model層創建

創建對應的資料庫表td_user與對應的Model模型類:

 

 

td_user類:

public class td_user
    {
        [System.ComponentModel.DataAnnotations.Key]
        public int UserId { get; set; }
        public int UserName { get; set; }
        public int PassWord { get; set; }
        public int Email { get; set; }
        public int Role { get; set; }
    }

注意:

①C#模型的類名稱與資料庫的表名稱要一致;

②C#模型的類屬性與資料庫的欄位要一致,

 

1.3.MVC5+EF6實作資料串列

①創建一個對應的UserController控制器;

public class UserController : Controller
    {
        // GET: User
        public ActionResult Index()
        {
            UserContext context = new UserContext();
            return View(context.td_user.ToList());
        }
    }

②在原來的UserContext背景關系檔案中配置背景關系檔案方法:

//創建一個UserContext背景關系連接類,繼承DbContext,使用name關聯Web.config中的連接陳述句
    public class UserContext : DbContext
    {
        public UserContext() : base("name=SqlConnString")
        {
            
        }
        //創建一個資料庫Model集合獲取方法
        public DbSet<td_user> td_user { get; set; }
    }

③在控制器中呼叫背景關系中方法獲取資料表DataSet集合;

④創建前臺顯示界面視圖View(此程序前要先重新編譯專案):

 

⑤注意在Web.config中配置SqlConnString連接陳述句配置:

  <connectionStrings>
    <add name="SqlConnString" connectionString="server=DESKTOP-3POL04N;uid=sa;pwd=123456;database=db_news;"
         providerName="System.Data.SqlClient"/>
  </connectionStrings>

注意必須加上:providerName="System.Data.SqlClient",否則會報錯:

 

 

完成后界面展示如下,這樣就完成了初步的頁面展示Select從資料庫獲取資料展示的功能:

 

 

1.4.MVC5+EF6詳細頁面顯示

這里要基于6.3的內容來實作前端頁面的增刪改查功能,目前實作Details的展示功能,也就是查看的功能:

①首先進行頁面標簽內容的修改,把英文改為中文:

@model IEnumerable<EFFramework.Models.td_user>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("新建", "Create")
</p>
<table class="table">
    <tr>
        <th>
           名稱
        </th>
        <th>
           密碼
        </th>
        <th>
            電子郵箱
        </th>
        <th>
            角色
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.UserName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.PassWord)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Email)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Role)
        </td>
        <td>
            @Html.ActionLink("編輯", "Edit", new { id=item.UserId }) |
            @Html.ActionLink("查看", "Details", new { id=item.UserId }) |
            @Html.ActionLink("洗掉", "Delete", new { id=item.UserId })
        </td>
    </tr>
}

</table>

②對應在ActionLink中去實作Controller中的Details方法,查詢的結果視圖:

//點擊查看根據當前的userId來展示用戶資訊
        public ActionResult Details(int id)
        {
            UserContext context = new UserContext();
            //var details = from c in context.td_user
            //              where int.Equals(c.UserId, id)
            //              select c;
            //List<td_user> userList = details.ToList();
            List<td_user> userList = context.td_user.Where(c => c.UserId == id).ToList();
            return View(userList.FirstOrDefault());
        }

這里嘗試使用Linq來進行視圖的查詢封裝,但是失敗了,會報錯:

 

 

原因是因為LINQ要求源資料必須是可列舉的集合,這里的tb_user是資料庫中的Domain物件沒有實作IEnumerable介面,所以還是使用原始的lamda運算式來求值:

 

③創建視圖Details.cshtml

 

 

<div>
    <h4>td_user</h4>
    <hr />
    <dl class="dl-horizontal">
        <dt>
            名稱
        </dt>

        <dd>
            @Html.DisplayFor(model => model.UserName)
        </dd>

        <dt>
            密碼
        </dt>

        <dd>
            @Html.DisplayFor(model => model.PassWord)
        </dd>

        <dt>
            郵箱
        </dt>

        <dd>
            @Html.DisplayFor(model => model.Email)
        </dd>

        <dt>
            角色
        </dt>

        <dd>
            @Html.DisplayFor(model => model.Role)
        </dd>

    </dl>
</div>
<p>
    @Html.ActionLink("編輯", "Edit", new { id = Model.UserId }) |
    @Html.ActionLink("回傳視圖", "Index")
</p>

跳轉頁面進行資料展示,結果如圖所示:

 

 

1.5.MVC5+EF6資料添加

Create添加主要是完成增加資料的功能:

①根據@Html.ActionLink("新建", "Create")新建Create方法,主要用于編輯頁面展示:

//新增Create
        public ActionResult Create()
        {
            return View();
        }

建立View界面:

 

 

修改展示頁面引數:

@model EFFramework.Models.td_user

@{
    ViewBag.Title = "Create";
}

<h2>Create</h2>


@using (Html.BeginForm("AddUser", "User")) //表單提交到后臺AddUser控制方法
{
    @Html.AntiForgeryToken()
    
    <div class="form-horizontal">
        <h4>td_user</h4>
        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
        <div class="form-group">
            <label class = "control-label col-md-2">姓名</label>
            <div class="col-md-8">
                @Html.EditorFor(model => model.UserName, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.UserName, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            <label class = "control-label col-md-2">密碼</label>
            <div class="col-md-8">
                <input type="password" class="form-control" name="PassWord">
                @Html.ValidationMessageFor(model => model.PassWord, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            <label class="control-label col-md-2">郵箱</label>
            <div class="col-md-8">
                @Html.EditorFor(model => model.Email, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Email, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            <label class="control-label col-md-2">角色</label>
            <div class="col-md-8">
                @Html.EditorFor(model => model.Role, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Role, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="新增" class="btn btn-default" />
            </div>
        </div>
    </div>
}

<div>
    @Html.ActionLink("回傳視圖", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}

②根據Form表單提交創建AddUser方法進行資料插入,同時回傳Index視圖界面做資料展示:

//新增點擊方法
        public ActionResult AddUser(td_user user)
        {
            UserContext context = new UserContext();
            context.td_user.Add(user);
            //保存新增至資料庫
            context.SaveChanges();
            //回傳展示頁面,UserController下面的Index頁面
            return View("Index", context.td_user.ToList());
        }

1.6.MVC5+EF6資料編輯

編輯和添加類似,這里主要提及注意的幾個點:

①根據Index.cshtml中@Html.ActionLink("編輯", "Edit", new { id=item.UserId })創建編輯Controller方法:

//編輯Edit
        public ActionResult Edit(int id)
        {
            //顯示傳過來的資料
            UserContext context = new UserContext();
            var queryUser = context.td_user.Where(u => u.UserId == id).ToList().FirstOrDefault();
            return View(queryUser);
        }

②同時需要創建Edit.cshtml視圖頁面,不能和Create.cshtml共享,主要密碼部分是要顯示的:

 

 

③更新Update方法在Controller中注意是回傳Index視圖,也是IEnumerable型別的集合:

//保存點擊方法
        public ActionResult Update(td_user user)
        {
            UserContext context = new UserContext();

            //先從資料庫查詢到user對應id在資料庫中的那個值
            var queryOne = context.td_user.Where(u => u.UserId == user.UserId).ToList().FirstOrDefault();
            //再把這個值更新
            queryOne.UserName = user.UserName;
            queryOne.PassWord = user.PassWord;
            queryOne.Email = user.Email;
            queryOne.Role = user.Role;

            context.SaveChanges();
            return View("Index", context.td_user.ToList());
        }

1.7.MVC5+EF6資料洗掉

洗掉比較簡單,直接實作Delete方法即可:

//點擊洗掉按鈕
        public ActionResult Delete(int id)
        {
            UserContext context = new UserContext();

            //先從資料庫查詢到user對應id在資料庫中的那個值
            var queryOne = context.td_user.Where(u => u.UserId == id).ToList().FirstOrDefault();
            //再把這個值洗掉
            context.td_user.Remove(queryOne);
            context.SaveChanges();
            return View("Index", context.td_user.ToList());
        }

1.8.MVC5+EF6查詢功能

①首先確定前臺View中使用<form>進行表單資料提交,將查詢資訊通過<input>中的name屬性值代入后臺Controller控制器方法中:

<form action="/User/Search" method="post">
    請輸入用戶名查詢:<input type="text" name="username"/>
    <input type="submit" value="查詢">
</form>

②后臺Controller對應Search方法,查詢到結果進行封裝并回傳Index頁面進行查詢資料展示:

//username必須和View視圖中的姓名輸入框中的name屬性值一致
        [HttpPost]
        public ActionResult Search(string username)
        {
            UserContext context = new UserContext();
            //模糊查詢出所有相似的結果
            List<td_user> queryList = context.td_user.Where(u => u.UserName.Contains(username)).ToList();
            //跳轉到前臺進行頁面展示
            return View("Index", queryList);
        }

1.9.MVC5+EF6多條件查詢

多條件查詢需要在前臺進行對應條件的新增,與新增引數傳入后臺Controller進行資料篩選:

<form action="/User/Search" method="post">
    請輸入用戶名查詢:<input type="text" name="username"/>
    角色:<select name="role">
            <option>管理員</option>
            <option>普通員工</option>
          </select>
    <input type="submit" value=https://www.cnblogs.com/yif0118/p/"查詢">
</form>

  //username必須和View視圖中的姓名輸入框中的name屬性值一致
        [HttpPost]
        public ActionResult Search(string username, string role)
        {
            UserContext context = new UserContext();
            //模糊查詢出所有相似的結果
            List<td_user> queryList = context.td_user
                .Where(u => u.UserName.Contains(username))
                .Where(u => u.Role == role)
                .ToList();
            //跳轉到前臺進行頁面展示
            return View("Index", queryList);
        }

對應查詢結果:

 

 

1.10.MVC5+EF6系統登錄

登錄首先是要創建一個登陸界面Index.cshtml,這里面有個action會跳轉LoginController進行后臺引數傳遞,@ViewBag.Message進行的是登錄失敗后的資訊顯示;

<form action="/Login/Login" method="post">
    <table>
        <tr>
            <td>賬號:</td>
            <td><input type="text" name="userName" /></td>
        </tr>
        <tr>
            <td>密碼:</td>
            <td><input type="password" name="pwd" /></td>
        </tr>
        <tr>
            <td colspan="2"><input type="submit" value="登錄" /></td>
            <td></td>
        </tr>
        <tr>
            <td colspan="2">@ViewBag.Message</td>
        </tr>
    </table>
</form>

LoginController主要是進行登陸引數傳遞,跳轉頁面:

public class LoginController : Controller
    {
        // GET: Login
        public ActionResult Index()
        {
            return View();
        }

        [HttpPost]
        public ActionResult Login(string userName, string pwd)
        {
            UserContext context = new UserContext();
            //先到資料庫進行用戶名,密碼的匹配查詢
            List<td_user> queryRes = context.td_user.Where(u => u.UserName == userName).Where(u => u.PassWord == pwd).ToList();

            //查詢到了資料庫有這個用戶
            if (queryRes != null && queryRes.Count > 0)
            {
                //跳轉到用戶管理界面進行資料頁面展示,UserController中的Index
                return RedirectToAction("Index", "User");
            }
            //沒有這個用戶
            else
            {
                //回傳登錄頁面
                ViewBag.Message = "用戶資訊不存在";
                return View("Index");//回傳本類的Index登錄頁面視圖
            }
        }
    }

1.11.MVC5+EF6系統登錄安全設定AuthorizeAttribute

安全設定是為了避免用戶在訪問時直接通過展示頁面的Controller介面url訪問后臺資料,一般老系統在實作時會在方法中使用Session來查看是否有值,但是這樣會造成多個控制器介面都需要增加同一套Session取值判斷代碼,這里統一使用AuthorizeAttribute設定來避免重復代碼,

 

傳統的Session驗證方式:

 

 

 

 

使用AuthorizeAttribute配置注解的方式:

①自定義一個注解類UserAuthorizeAttibute來繼承自AuthorizeAttribute安全注解屬性類,并覆寫AuthorizeCore方法:

public class UserAuthorizeAttribute : AuthorizeAttribute
    {
        protected override bool AuthorizeCore(HttpContextBase httpContext)
        {
            if (System.Web.HttpContext.Current.Session["username"] == null)
            {
                return false;
            }
            return true;
        }
    }

在后臺訪問控制器類上面加上注解[UserAuthorizeAttribute],表示當前類已經統一進行了Session訪問的驗證:

 

 

加入注解限制后那么我們再次使用url嘗試進行訪問驗證時,就不能越過攔截進行后臺資料的訪問了,這里會直接攔截跳轉到401界面:

 

 

而上述401界面可以由開發者自定義展示,不顯示401報錯界面,可以在Web.config頁面下進行下面的配置:

<!--用戶自定義攔截驗證跳轉頁面:登錄失敗回傳loginUrl頁面,timeout自定義登錄后Session有效時間:一般20分鐘-->
    <authentication mode="Forms">
      <forms loginUrl="/Login/Index"  timeout="20"></forms>
    </authentication>

 

 

通過上述配置,在瀏覽器地址欄中再次嘗試輸入/User進行頁面訪問后會自動重定向到登錄頁面不會進行401報錯顯示:

 

轉載請註明出處,本文鏈接:https://www.uj5u.com/net/63.html

標籤:Entity Framework

上一篇:Entity Framework體系結構

下一篇:【.NET框架】—— MVC5+EF6物體模型自動創建(二)

標籤雲
其他(157675) Python(38076) JavaScript(25376) Java(17977) C(15215) 區塊鏈(8255) C#(7972) AI(7469) 爪哇(7425) MySQL(7132) html(6777) 基礎類(6313) sql(6102) 熊猫(6058) PHP(5869) 数组(5741) R(5409) Linux(5327) 反应(5209) 腳本語言(PerlPython)(5129) 非技術區(4971) Android(4554) 数据框(4311) css(4259) 节点.js(4032) C語言(3288) json(3245) 列表(3129) 扑(3119) C++語言(3117) 安卓(2998) 打字稿(2995) VBA(2789) Java相關(2746) 疑難問題(2699) 细绳(2522) 單片機工控(2479) iOS(2429) ASP.NET(2402) MongoDB(2323) 麻木的(2285) 正则表达式(2254) 字典(2211) 循环(2198) 迅速(2185) 擅长(2169) 镖(2155) 功能(1967) .NET技术(1958) Web開發(1951) python-3.x(1918) HtmlCss(1915) 弹簧靴(1913) C++(1909) xml(1889) PostgreSQL(1872) .NETCore(1853) 谷歌表格(1846) Unity3D(1843) for循环(1842)

熱門瀏覽
  • WebAPI簡介

    Web體系結構: 有三個核心:資源(resource),URL(統一資源識別符號)和表示 他們的關系是這樣的:一個資源由一個URL進行標識,HTTP客戶端使用URL定位資源,表示是從資源回傳資料,媒體型別是資源回傳的資料格式。 接下來我們說下HTTP. HTTP協議的系統是一種無狀態的方式,使用請求/ ......

    uj5u.com 2020-09-09 22:07:47 more
  • asp.net core 3.1 入口:Program.cs中的Main函式

    本文分析Program.cs 中Main()函式中代碼的運行順序分析asp.net core程式的啟動,重點不是剖析原始碼,而是理清程式開始時執行的順序。到呼叫了哪些實體,哪些法方。asp.net core 3.1 的程式入口在專案Program.cs檔案里,如下。ususing System; us ......

    uj5u.com 2020-09-09 22:07:49 more
  • asp.net網站作為websocket服務端的應用該如何寫

    最近被websocket的一個問題困擾了很久,有一個需求是在web網站中搭建websocket服務。客戶端通過網頁與服務器建立連接,然后服務器根據ip給客戶端網頁發送資訊。 其實,這個需求并不難,只是剛開始對websocket的內容不太了解。上網搜索了一下,有通過asp.net core 實作的、有 ......

    uj5u.com 2020-09-09 22:08:02 more
  • ASP.NET 開源匯入匯出庫Magicodes.IE Docker中使用

    Magicodes.IE在Docker中使用 更新歷史 2019.02.13 【Nuget】版本更新到2.0.2 【匯入】修復單列匯入的Bug,單元測驗“OneColumnImporter_Test”。問題見(https://github.com/dotnetcore/Magicodes.IE/is ......

    uj5u.com 2020-09-09 22:08:05 more
  • 在webform中使用ajax

    如果你用過Asp.net webform, 說明你也算是.NET 開發的老兵了。WEBform應該是2011 2013左右,當時還用visual studio 2005、 visual studio 2008。后來基本都用的是MVC。 如果是新開發的專案,估計沒人會用webform技術。但是有些舊版 ......

    uj5u.com 2020-09-09 22:08:50 more
  • iis添加asp.net網站,訪問提示:由于擴展配置問題而無法提供您請求的

    今天在iis服務器配置asp.net網站,遇到一個問題,記錄一下: 問題:由于擴展配置問題而無法提供您請求的頁面。如果該頁面是腳本,請添加處理程式。如果應下載檔案,請添加 MIME 映射。 WindowServer2012服務器,添加角色安裝完.netframework和iis之后,運行aspx頁面 ......

    uj5u.com 2020-09-09 22:10:00 more
  • WebAPI-處理架構

    帶著問題去思考,大家好! 問題1:HTTP請求和回傳相應的HTTP回應資訊之間發生了什么? 1:首先是最底層,托管層,位于WebAPI和底層HTTP堆疊之間 2:其次是 訊息處理程式管道層,這里比如日志和快取。OWIN的參考是將訊息處理程式管道的一些功能下移到堆疊下端的OWIN中間件了。 3:控制器處理 ......

    uj5u.com 2020-09-09 22:11:13 more
  • 微信門戶開發框架-使用指導說明書

    微信門戶應用管理系統,采用基于 MVC + Bootstrap + Ajax + Enterprise Library的技術路線,界面層采用Boostrap + Metronic組合的前端框架,資料訪問層支持Oracle、SQLServer、MySQL、PostgreSQL等資料庫。框架以MVC5,... ......

    uj5u.com 2020-09-09 22:15:18 more
  • WebAPI-HTTP編程模型

    帶著問題去思考,大家好!它是什么?它包含什么?它能干什么? 訊息 HTTP編程模型的核心就是訊息抽象,表示為:HttPRequestMessage,HttpResponseMessage.用于客戶端和服務端之間交換請求和回應訊息。 HttpMethod類包含了一組靜態屬性: private stat ......

    uj5u.com 2020-09-09 22:15:23 more
  • 部署WebApi隨筆

    一、跨域 NuGet參考Microsoft.AspNet.WebApi.Cors WebApiConfig.cs中配置: // Web API 配置和服務 config.EnableCors(new EnableCorsAttribute("*", "*", "*")); 二、清除默認回傳XML格式 ......

    uj5u.com 2020-09-09 22:15:48 more
最新发布
  • C#多執行緒學習(二) 如何操縱一個執行緒

    <a href="https://www.cnblogs.com/x-zhi/" target="_blank"><img width="48" height="48" class="pfs" src="https://pic.cnblogs.com/face/2943582/20220801082530.png" alt="" /></...

    uj5u.com 2023-04-19 09:17:20 more
  • C#多執行緒學習(二) 如何操縱一個執行緒

    C#多執行緒學習(二) 如何操縱一個執行緒 執行緒學習第一篇:C#多執行緒學習(一) 多執行緒的相關概念 下面我們就動手來創建一個執行緒,使用Thread類創建執行緒時,只需提供執行緒入口即可。(執行緒入口使程式知道該讓這個執行緒干什么事) 在C#中,執行緒入口是通過ThreadStart代理(delegate)來提供的 ......

    uj5u.com 2023-04-19 09:16:49 more
  • 記一次 .NET某醫療器械清洗系統 卡死分析

    <a href="https://www.cnblogs.com/huangxincheng/" target="_blank"><img width="48" height="48" class="pfs" src="https://pic.cnblogs.com/face/214741/20200614104537.png" alt="" /&g...

    uj5u.com 2023-04-18 08:39:04 more
  • 記一次 .NET某醫療器械清洗系統 卡死分析

    一:背景 1. 講故事 前段時間協助訓練營里的一位朋友分析了一個程式卡死的問題,回過頭來看這個案例比較經典,這篇稍微整理一下供后來者少踩坑吧。 二:WinDbg 分析 1. 為什么會卡死 因為是表單程式,理所當然就是看主執行緒此時正在做什么? 可以用 ~0s ; k 看一下便知。 0:000> k # ......

    uj5u.com 2023-04-18 08:33:10 more
  • SignalR, No Connection with that ID,IIS

    <a href="https://www.cnblogs.com/smartstar/" target="_blank"><img width="48" height="48" class="pfs" src="https://pic.cnblogs.com/face/u36196.jpg" alt="" /></a>...

    uj5u.com 2023-03-30 17:21:52 more
  • 一次對pool的誤用導致的.net頻繁gc的診斷分析

    <a href="https://www.cnblogs.com/dotnet-diagnostic/" target="_blank"><img width="48" height="48" class="pfs" src="https://pic.cnblogs.com/face/3115652/20230225090434.png" alt=""...

    uj5u.com 2023-03-28 10:15:33 more
  • 一次對pool的誤用導致的.net頻繁gc的診斷分析

    <a href="https://www.cnblogs.com/dotnet-diagnostic/" target="_blank"><img width="48" height="48" class="pfs" src="https://pic.cnblogs.com/face/3115652/20230225090434.png" alt=""...

    uj5u.com 2023-03-28 10:13:31 more
  • C#遍歷指定檔案夾中所有檔案的3種方法

    <a href="https://www.cnblogs.com/xbhp/" target="_blank"><img width="48" height="48" class="pfs" src="https://pic.cnblogs.com/face/957602/20230310105611.png" alt="" /></a&...

    uj5u.com 2023-03-27 14:46:55 more
  • C#/VB.NET:如何將PDF轉為PDF/A

    <a href="https://www.cnblogs.com/Carina-baby/" target="_blank"><img width="48" height="48" class="pfs" src="https://pic.cnblogs.com/face/2859233/20220427162558.png" alt="" />...

    uj5u.com 2023-03-27 14:46:35 more
  • 武裝你的WEBAPI-OData聚合查詢

    <a href="https://www.cnblogs.com/podolski/" target="_blank"><img width="48" height="48" class="pfs" src="https://pic.cnblogs.com/face/616093/20140323000327.png" alt="" /><...

    uj5u.com 2023-03-27 14:46:16 more