原创 MVC 擴展RadioButtonListFor和CheckBoxListFor
學習MVC時候前端通常會用到HtmlHelper,使得前端編碼簡便很多。我們可能會經常用到htmlHelper中一些的EditorFor,LabelFor,ValiationMessageFor, 發現這些方法都是在Sys
原创 .net Core 中將原MVC中的 MvcHtmlString轉換
public static IHtmlContent CustomLabelFor(this IHtmlHelper helper, Expression> expression, object htmlAttributes) {
原创 EF 一個實體對象不能由多個 IEntityChangeTracker 實例引用 解決辦法
在DAL層中,建立工廠類 public static class SysDbContextFactory { /// /// 從Http上下文中獲取EF容器 ///
原创 Task 運用
創建Task任務的方法 // 法一 var tf = new TaskFactory(); var t_a = tf.StartNew(() => Consol
原创 .net Core 發佈並佈署到Iis
配置 Program.cs代碼 namespace WebApplication8 { public class Program { public static void