目前分類:asp.net (3)

瀏覽方式: 標題列表 簡短摘要

最近開始使用AngularJS+ASP.NET WebAPI做專案
restful webapi 雖定義了GET/POST/PUT/DELETE 但並無標準web service 的wdsl 可以產生xml 文件
此時需安裝套件以自動產生help page,開發筆記如下:

1.使用nuget安裝套件helppage

Package Manager Console> Install-Package Microsoft.AspNet.WebApi.HelpPage

2.使用/// 快速鍵,將controller之action 等級加上說明

/// <summary>
/// 刪除外撥主檔
/// </summary>
/// <param name="outboundIdRoot"></param>
/// <returns></returns>
public bool Delete(string outboundIdRoot)
{
    OutboundProgramBLL outboundProgramBLL = new OutboundProgramBLL();
    return outboundProgramBLL.Delete(outboundIdRoot); ;
}

3.專案屬性
輸出:XML文件檔案:App_Data\Document.XML

4.設定使用Document.XML
修改~Area/HelpPage/App_Start/HelpPageConfig.cs           

  public static void Register(HttpConfiguration config)
        {
        //// Uncomment the following to use the documentation from XML documentation file.
            config.SetDocumentationProvider(
new XmlDocumentationProvider(
HttpContext.Current.Server.MapPath("~/App_Data/Document.XML")));
            //...
            //...
        }


5.F6重新編譯 專案

7.使用http://xxxxxx/help  查看helppage


 










michaelfang 發表在 痞客邦 留言(0) 人氣()

今年的Techdays 2015 Taiwan大會影片
已經於channel9 上傳

https://channel9.msdn.com/Events/TechDays/TechDays-Taiwan-2015


1.專案管理 

尋找不用加班的 15 種方法

https://channel9.msdn.com/Events/TechDays/TechDays-Taiwan-2015/OFC205


2.asp.net

ASP.NET 5 開發攻略

https://channel9.msdn.com/Events/TechDays/TechDays-Taiwan-2015/DEV305

3.C#

.NET Framework 技術架構發展與 C# 6.0

https://channel9.msdn.com/Events/TechDays/TechDays...

4.敏捷開發

實現 End to End 的雲端敏捷開發流程


https://channel9.msdn.com/Events/TechDays/TechDays...

5.跨平台開發

C#. 跨界 X 跨平台.Visual Studio & Xamarin 開發

https://channel9.msdn.com/Events/TechDays/TechDays...




michaelfang 發表在 痞客邦 留言(0) 人氣()

參考:https://channel9.msdn.com/Events/TechDays/TechDays...

TechDays 2015 之 保哥-ASP.NET 5 開發攻略

1.安裝node.js
2.npm install -g yo   (安裝套件管理工具 yeoman之全域套件)
3.npm install -g generator-aspnet   (安裝aspnet 站台產生套件,類似express)
4.yo aspnet    (選擇WebApplication,並輸入應用程式目錄名稱aspnet5, yo會產生範本程式碼)

2.建置
2.1 cd aspnet5 
2.2  dnu restore   (還元套件,須先安裝aspnet 5 , 參考: http://docs.asp.net/en/latest/getting-started/inst...)
2.3 dnu build

3.開發:
3.1  code .   (對目前資料夾, 使用Visual Studio Code 進行開發)
3.2 或使用VS2015 開起專案檔aspnet5/project.json 進行開發建置
3.3 dnx web  (啟動站台http://localhost:5000)











michaelfang 發表在 痞客邦 留言(0) 人氣()