DevOps with ASP.NET Core and Entity Framework Core

Slides:



Advertisements
Similar presentations
Entity Framework Code First Migrations
Advertisements

Software Testing with Visual Studio 2013 & Team Foundation Server 2013 Benjamin Day.
Real World Scrum with TFS2013 Benjamin Day. Brookline, MA Consultant, Coach, & Trainer Microsoft MVP for Visual Studio ALM Team Foundation Server, Software.
Team Foundation Server 2010 Builds: Understand, Configure, and Customize Benjamin Day benday.com |
What’s New in ASP.NET 5 and Visual Studio 2015 SPENCER SCHNEIDENBACH GADELLNET CONSULTING SERVICES.
Virtual techdays INDIA │ august 2010 Building ASP.NET applications using SQL Server Compact Chaitanya Solapurkar │ Partner Technical Consultant,
@benday #vslive Automated Build, Test & Deploy with TFS, ASP.NET, and SQL Server Benjamin
Intro to Entity Framework By Shahed Chowdhuri Don’t drown in database design during WakeUpAndCode.com.
Windows Azure Tour Benjamin Day Benjamin Day Consulting, Inc.
Team Foundation Server 2012 Builds: Understand, Configure, and Customize Benjamin Day.
Database Projects in Visual Studio Improving Reliability & Productivity.
Real World SQL Server Data Tools Benjamin
To Git or Not to Git for Enterprise Development Benjamin Edward Thomson
Eliminate Team Build Headaches with Unit Tests, WiX and Virtualization Benjamin Day
Benjamin Day Get Good at DevOps: Feature Flag Deployments with ASP.NET, WebAPI, & JavaScript.
Data in Windows 10 UWP Andy Wigley XML, JSON, SQLite or EF Core ?
Benjamin Unit Testing & Test-Driven Development for Mere Mortals.
Benjamin Day Role-based Security Stinks: Better Authorization in ASP.NET.
1 Adding a Model. We have created an MVC web app project Added a controller class. Added a view class. Next we will add some classes for managing movies.
Windows App Studio Windows App Studio is the tool that makes it fast and easy to build Windows 10 apps. It’s accessible from any device with a browser.
Benjamin Day Real World Scrum with TFS 2015 & VSTS.
ASP.NET Core* in 2017 The Future of Web Apps Shahed Chowdhuri
Introduction ITEC 420.
Build and Learn ASP.NET Workshop.
Stress Free Deployments with Octopus Deploy
Getting started with .NET Core
Better Unit Tests through Design Patterns: Repository, Adapter, Mocks, and more… Benjamin
DotnetConf 9/10/2018 7:49 PM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE.
ASP.NET MVC Introduction
6/11/2018 8:14 AM THR2175 Building and deploying existing ASP.NET applications using VSTS and Docker on Windows Marcel de Vries CTO, Xpirit © Microsoft.
Introduction to .NET Core
Building a Continuous Delivery Pipeline for ASP.NET Core Apps
Jon Galloway | Tech Evangelist Christopher Harrison | Head Geek
ASP.NET in Linux and Windows containers
Lean .NET stack for building modern web apps
Entity Framework Core for Enterprise Applications
Introducing ASP.NET Core 2.0
Microsoft Virtual Academy
1.1. .NET architectural components and .NET Core
Unit Testing & Test-Driven Development for Mere Mortals
Build /21/2018 © 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION.
MVC in ASP.NET Core: The new kid on the block
Unit Testing & Test-Driven Development for Mere Mortals
SQL Server Data Tools Gert Drapers
Microsoft Ignite NZ October 2016 SKYCITY, Auckland
Slides and images stolen from “real” .NET Conf. presenters
An Introduction to Entity Framework
Get Good at DevOps: Feature Flag Deployments with ASP
Intro to Unit Testing with tSQLt
Unit Testing & Test-Driven Development for Mere Mortals
Real World Scrum with TFS & VSTS / Azure DevOps
Your code is not just…your code
What’s new in ASP.NET Core and Entity Framework 2.2 (Preview 3)
SSDT and Database Project Basics
From Development to Production: Optimizing for Continuous Delivery
Entity Framework Code-First Migrations
Entity Framework Core for Enterprise Applications
Implementing Security in ASP.NET Core: Claims, Patterns, and Policies
Open Automation Software
From Development to Production: Optimizing for Continuous Delivery
Implementing Entity Framework with MVC Jump Start
C# - EF Core Intro IT College, Andres Käver, , Fall semester
Martin MSBuild Martin
Getting Productive with ASP.NET MVC 3
#01# ASP.NET Core Overview Design by: TEDU Trainer: Bach Ngoc Toan
Development Environment Setup
Extend Azure DevOps with a Custom PowerShell-based Pipeline Task
Your code is not just…your code
DataBase Application .NET
ASP.NET Core 2.0 The Future of Web Apps Shahed Chowdhuri
Presentation transcript:

DevOps with ASP.NET Core and Entity Framework Core Benjamin Day

Benjamin Day Brookline, MA Consultant & Trainer Scrum, DevOps, Team Foundation Server, Software Architecture & Testing Microsoft MVP Pluralsight Author Scrum.org Trainer @benday

Pluralsight.com Online courses DevOps with TFS2015 Scrum Master Skills

On with the show.

Humans are terrible at multitasking.

Productivity vs. Waste "Quality Software Management: Vol. 1 System Thinking“, Gerald Weinberg (1992)

To be productive, eliminate distractions.

Software delivery not software development.

Anything that slows you down, automate it.

What is DevOps?

DevOps is a mindset plus a set of practices that focuses on automation.

Why DevOps? Minimize distractions Focus on delivering software Eliminate the tedious stuff Bridge the divide between development, delivery, deployment, and operations

Make delivery & deployment easy.

If delivery & deployment is easy… …it’s not a big deal …you’ll do it more often …you can focus more time writing & delivering features

DevOps Goals Repeatable, Automated, & Version Controlled Including configuration Never deploy from a developer workstation No right-click  deploy Deploy from TFS Build Deploy from TFS Release Management Pipeline

ASP.NET Core & Entity Framework Core

DevOps with ASP.NET Core & EF Core Tricky Cross-platform Windows, Mac, & Linux More frameworks to target New config files New project format New IDEs Visual Studio 2017 Visual Studio for Mac Visual Studio Code

DevOps: Don’t Forget the Database! Does your app use a database? You’ll need to version control it Automated build & deploy of database schemas Two approaches: SQL Server Data Tools (SSDT) Entity Framework Migrations

.NET Core DevOps Tip: Learn how to do everything from the command line

.NET Core Command Line Cheat Sheets

Everything happens through the “dotnet” command.

dotnet = .NET Core CLI

Go to http://dot.net Download the .NET Core SDK https://www.microsoft.com/net/download/core

Create Solutions & Projects dotnet new sln classlib mvc mstest dotnet sln {solution-filename} add {path-to-csproj}

Add References Add a Project Reference dotnet add {from-csproj-file} reference {to-csproj-file} Add a NuGet Package dotnet add {from-csproj-file} package {package-name}

Compile Restore all dependencies dotnet restore Build the project or solution dotnet build Clean the folder structure dotnet clean

Entity Framework Core

EF Core NuGet Packages Talk to SQL Server Microsoft.EntityFrameworkCore.SqlServer Database Updates (“Migrations”) Microsoft.EntityFrameworkCore.Design Reverse Engineer a SQL Server Database Microsoft.EntityFrameworkCore.SqlServer.Design

Enable the “dotnet ef” Command Edit *.csproj Add DotNetCliToolReference to Microsoft.EntityFrameworkCore.Tools.DotNet

EF Migrations = Entity Framework Version Control

Migrations from the Command Line Add / Remove a Migration dotnet ef migrations add “{name}” dotnet ef migrations remove Deploy an Update dotnet ef database update

Import Existing Database to EF Core dotnet ef dbcontext scaffold dotnet ef dbcontext scaffold -c {dbcontext-name} "Server=(local); Database={database}; Trusted_Connection=true;" Microsoft.EntityFrameworkCore.SqlServer

Hosting ASP.NET Core on IIS

Host ASP.NET Core on IIS Install .NET Core Windows Server Hosting Bundle https://go.Microsoft.com/fwlink/?linked=837808

Demos

Demo 1 Create a Solution Create Projects Create References

Demo 2 Add Entity Framework Core NuGet Libraries Add DbContext & Entity Add an Initial Migration Deploy the Database

Demo 3 DbContextFactory Fix hard-coded connection strings Add unit test

Demo 4 Add ASP.NET Core Web Interface

Demo 5 Create Team Project Add to TFS Version Control

Demo 6 Create a basic build Edit connection strings Deploy db changes using EF Migrations

Demo 7 Use Release Management Deploy to Multiple Environments Add Environment Approvals

Any last questions?

Thank you. www.benday.com | benday@benday.com