發表文章

目前顯示的是 4月, 2018的文章

dotnet new sln

# Create the solution directory mkdir dotnet-identity-example cd dotnet-identity-example # Create the Web project using an empty webapi template dotnet new webapi --name Web # Create a solution file and add the web project to it dotnet new sln dotnet sln add Web/Web.csproj # Restore dependencies and run the project dotnet restore cd Web dotnet run

Identity Server WebAPI

圖片
DAL 安裝所需套件 install-package AutoMapper 新增 Models目錄 新增 ApplicationUser.cs using Microsoft.AspNetCore.Identity; public class ApplicationUser :IdentityUser { ...新增所需要之欄位 } 新增 Models目錄 新增 ApplicationRole.cs using Microsoft.AspNetCore.Identity; public class ApplicationRole :IdentityRole { ...新增所需要之欄位 } 專案目錄下 新增 ApplicationDbContext.cs using Microsoft.AspNetCore.Identity.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; public class ApplicationDbContext :IdentityDbContext<ApplicationUser,ApplicationRole, string > { public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) : base(options) { } protected override void OnModelCreating(ModelBuilder builder) { base.OnModelCreating(builder); } } 新增 專案名稱 IdentityWebAPI 並選擇 API 將DAL 專案加入參考 安裝所需套件 install-package AutoMapper install-package IdentityServer4 instal...

Material Admin

ng new website --style=scss --routing --skip-tests Install Material Component npm install --save @angular/material @angular/cdk npm install --save hammerjs npm install @angular/flex-layout modify main.ts import 'hammerjs'; modify style.scss @import '~@angular/material/prebuilt-themes/indigo-pink.css'; in app below ng g module shared shared.module.ts ---------------- import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FlexLayoutModule } from '@angular/flex-layout'; import { MatAutocompleteModule, MatButtonModule, MatButtonToggleModule, MatCardModule, MatCheckboxModule, MatChipsModule, MatDatepickerModule, MatDialogModule, MatExpansionModule, MatGridListModule, MatIconModule, MatInputModule, MatListModule, MatMenuModule, MatNativeDateModule, MatPaginatorModule, MatProgressBarModule, MatProgressSpinn...