1.
要有裝
dotnet add package Microsoft.EntityFrameworkCore.SqlServer
再裝
dotnet add TodoApi.csproj package Swashbuckle.AspNetCore -v 5.0.0-rc4
不然會一直出錯
2019年12月3日 星期二
2019年4月4日 星期四
[Xamarin]Incompatible HAX module version 3,requires minimum version 4 No accelerator found. failed to initialize HAX: Invalid argument 2019
原因:Incompatible HAX module version 3,requires minimum version 4 No accelerator found. failed to initialize HAX: Invalid argument 2019
方法:因為下載 HAXM is installed in the Android SDK Manager,但是沒有安裝,找到安裝檔案位置,手動安裝
方法:因為下載 HAXM is installed in the Android SDK Manager,但是沒有安裝,找到安裝檔案位置,手動安裝
2018年6月9日 星期六
2017年11月1日 星期三
2017年10月19日 星期四
jquery的intellisense
visual studio 2017
在工具選項的javascript/TypeScript的Language Service 把啟用新的JavaScript Language Service的打勾移除
另外作法:
在js檔中加入下列一段,會自動參考(版本自行替換)
/// <reference path="Scripts/jquery-2.0.0.min.js" /> /// <reference path="Scripts/jquery-2.0.0.intellisense.js" />
在工具選項的javascript/TypeScript的Language Service 把啟用新的JavaScript Language Service的打勾移除
另外作法:
在js檔中加入下列一段,會自動參考(版本自行替換)
/// <reference path="Scripts/jquery-2.0.0.min.js" /> /// <reference path="Scripts/jquery-2.0.0.intellisense.js" />
dapper 連接資料庫
連接資料庫有ado.net,dapper,Entity Framework
Imports System.Transactions //可以加快速度
1.開啟NuGet管理視窗下載Dapper
C#
顯示在gridview
protected void Page_Load(object sender, EventArgs e)
{
GridView1.DataSource = ReadAll();
GridView1.DataBind();
}
public class conference
{
public 資料庫欄位型別 資料庫欄位名稱 { get; set; }
//出來的資料也只有定義在類別(這裡)的資料
}
public List<con> ReadAll()
{
using (IDbConnection db = new SqlConnection(ConfigurationManager.ConnectionStrings["xxx"].ConnectionString))
{
return db.Query<con>
("Select * From 資料庫 m" Where xxx=@xxx",
new { xxx = 1 }).ToList();
}
}
2017年10月18日 星期三
MVC api教學網站
http://kirkchen.logdown.com/pages/use-aspnet-mvc-to-develop-api
http://kirkchen.logdown.com/posts/246422-aspnet-mvc-using-aspnet-idetity-integrate-google-login
http://kirkchen.logdown.com/posts/246422-aspnet-mvc-using-aspnet-idetity-integrate-google-login
訂閱:
文章 (Atom)