10/30/2018 - 7:13 AM

core+angular checklist

core+angular checklist

(mac pc) shift + control + p 

Angular v6 Snippets by John Papa
ASP.NET Helper by schneiderpat
Auto Import by steoates
Beautify by HookyQR
C# by microsoft
C# Extension by jchannon
Docker by microsoft
SQL Server (mssql) by microsoft
REST Client by Huachao Mao

node package
Yeoman - project template
   - sudo npm install -g yo generator-aspnetcore-spa
install sqlserver via docker
   -sudo docker pull microsoft/mssql-server-linux
   -sudo docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=MyComplexPassword!234' -p 1433:1433 -d microsoft/mssql-server-linux

Use Cases

create a project
   -yo aspnetcore-spa is deprecated
   -dotnet new angular
   -dotnet run
environment variable
   -code .bash_profile
   -add.. export ASPNETCORE_ENVIRONMENT=Development

  -- dotnet watch run
  -- already included in .Net Core 2.1 SDK

Adding Entity Framework Core
  -- dotnet add package Microsoft.EntityFrameworkCore.SqlServer
  -- dotnet restore
  -- already included in .Net Core 2.1 SDK
  -- dotnet add package Microsoft.EntityFrameworkDesign
Creating database
  -- dotnet ef migrations add InitModel
  -- dotnet ef migrations remove
  -- dotnet ef database update
  -- dotnet ef database update 0 <-- will downgrade specifically to that migration.
  -- dotnet eff migrations add SeedDatabase

  -- dotnet add package AutoMapper
Angular CLI
  -- sudo npm install @angular/cli@latest -g
  -- npm install @angular/cli@latest --save-dev <-- install as dev dependency

force update the commit base on Id
-- git push origin HEAD:master --force
creating a component in angular
-- ng g component vehicle-form
zen coding
div.form-group>label[for='model']+select[id='model'].form-control(cursor at end then press tab)

angular - create service
-- ng g service make

Should you split your ASP.NET MVC project into multiple projects?

toaster npm
  --npm install ng2-toasty@2.5.0 --save

mac kill process
  -- lsof -i:5000
  -- kill -9 (PID)