SlideShare a Scribd company logo
1 of 24
z
Blazor
Sandun Perera
2019-01-02
z
Flow
 Intro
 Pre-requisites
 Blah blah blah
 Demo
 Discussion
z
Intro
 Blazor is a single-page web app framework built on .NET that
runs in the browser with WebAssembly.
 Razor on browser => Blazor
 WebAssembly.js
 Mono.js
 Azure support
z
Why use .NET in the browser?
 Stability and consistency
 Modern innovative languages
 Industry-leading tools
 Speed and scalability
 Full-stack development that leverages existing skills
 Wide browser support
z
How Blazor runs .NET in the browser
 Running .NET code inside web browsers is made possible by a relatively new
technology, WebAssembly (wasm). WebAssembly is an open web standard and
is supported in web browsers without plugins.
 WebAssembly code can access the full functionality of the browser via
JavaScript interop. Also WebAssembly code runs in the same trusted sandbox
as JavaScript for security.
 C# code files and Razor files are compiled into .NET assemblies.
 The assemblies and the .NET runtime are downloaded to the browser.
 Blazor uses JavaScript to bootstrap the .NET runtime and configures the runtime to
load required assembly references. Document object model (DOM) manipulation and
browser API calls are handled by the Blazor runtime via JavaScript interoperability.
 To support older browsers that don't support WebAssembly, Blazor falls back to using
an asm.js-based .NET runtime.
z
Blazor components
 Blazor apps are built with components. A component is a piece
of UI, such as a page, dialog, or data entry form. Components
can be nested, reused, and shared between projects.
 In Blazor, a component is a .NET class. The class can either be
written directly, as a C# class (*.cs), or more commonly in the
form of a Razor markup page (*.cshtml).
z
Infrastructure
 Blazor offers the core facilities that most apps require, including:
 Layouts
 Routing
 Dependency injection
 All of these features are optional. When one of these features
isn't used in an app, the implementation is stripped out of the
app when published by the Intermediate Language (IL) Linker.
z
Code sharing and .NET Standard
 Blazor supports .NET Standard 2.0 or higher. APIs that aren't
applicable inside a web browser (for example, accessing the file
system, opening a socket, threading, and other features)
throw PlatformNotSupportedException. .NET Standard class
libraries can be shared across server code and in browser-
based apps.
z
JavaScript interop
 For apps that require third-party JavaScript libraries and browser
APIs, WebAssembly is designed to interoperate with JavaScript.
Blazor is capable of using any library or API that JavaScript is
able to use. C# code can call into JavaScript code, and
JavaScript code can call into C# code.
z
Optimization
 For client-side apps, payload size is critical. Blazor optimizes
payload size to reduce download times. For example, unused
parts of .NET assemblies are removed during the build process,
HTTP responses are compressed, and the .NET runtime and
assemblies are cached in the browser.
z
Deployment
 Use Blazor to build a pure standalone client-side app or a full-stack
ASP.NET Core app that contains both server and client apps:
 In a standalone client-side app, the Blazor app is compiled into
a dist folder that only contains static files. The files can be hosted on
Azure App Service, GitHub Pages, IIS (configured as a static file
server), Node.js servers, and many other servers and services. .NET
isn't required on the server in production.
 In a full-stack ASP.NET Core app, code can be shared between
server and client apps. The resulting ASP.NET Core server app, which
serves the Blazor client-side UI and other server-side API endpoints,
can be built and deployed to any cloud or on premise host supported
by ASP.NET Core.
z
Pre-requisites
 .NET Core 2.1 SDK (2.1.402 or later).
 Visual Studio 2017 (15.8 or later) with the ASP.NET and web
development workload selected.
 The latest Blazor Language Services extension from the Visual
Studio Marketplace.
 Knowledge on web development and Razor syntaxes
 General purpose web browser 
z
The Stack
Dev time C# / Razor source files
YourApp.dll
netstandard .NET
assembly files
mono.wasm
WebAssembly binary
executed natively
Browser APIs
visible DOM, HTTP
requests, etc
Runtime
(in browser)
z
Demo
In the browser
z
Lifecycle methods
 OnInitAsync() / OnInit()
 OnParametersSetAsync() / OnParametersSet()
 OnAfterRenderAsync() / OnAfterRender()
z
Routing
 @page "/BlazorRoute"
 @page "/DifferentBlazorRoute“
 @page "/RouteParameter/{text}“
 @page "/Users/{Id:int}"
z
Separation of Concern
@page "/BlazorRocks"
@*
The inherit directive provides the properties and methods
of the BlazorRocksBase class to this component.
*@
@inherits BlazorRocksBase
<h1>@BlazorRocksText</h1>
using Microsoft.AspNetCore.Blazor.Components;
public class BlazorRocksBase : BlazorComponent
{
public string BlazorRocksText { get; set; } = "Blazor rocks the browser!";
}
z
Layouts
@layout MasterLayout
@page "/master-data"
<h2>Master Data Management</h2>
@layout MasterDataLayout
@page "/master-data/customers"
<h1>Customer Maintenance</h1>
z
Dependency Injection
public void ConfigureServices(IServiceCollection services)
{
services.AddScoped<IDataAccess, DataAccess>();
}
@page "/customer-list"
@using Services
@inject IDataAccess DataRepository
z
JavaScript
<body>
<app>Loading...</app>
<script src="exampleJsInterop.js"></script>
</body>
public static Task<string> Display(string welcomeMessage)
{
// displayWelcome is implemented in wwwroot/exampleJsInterop.js
return JSRuntime.Current.InvokeAsync<string>(
"exampleJsFunctions.displayWelcome", welcomeMessage);
}
z
Publish and Deploy
 dotnet publish -c Release
 With the use of commands, it is configurable for Azure WebApp
deployment and hosting.
z
References
 https://blazor.net/
 https://blazor.net/docs/get-started.html
Blazor

More Related Content

What's hot

Finding Your Way in Container Security
Finding Your Way in Container SecurityFinding Your Way in Container Security
Finding Your Way in Container Security
Ksenia Peguero
 
An Introduction to Maven
An Introduction to MavenAn Introduction to Maven
An Introduction to Maven
Vadym Lotar
 

What's hot (20)

Building Web Apps with WebAssembly and Blazor
Building Web Apps with WebAssembly and BlazorBuilding Web Apps with WebAssembly and Blazor
Building Web Apps with WebAssembly and Blazor
 
Welcome to Blazor
Welcome to BlazorWelcome to Blazor
Welcome to Blazor
 
Finding Your Way in Container Security
Finding Your Way in Container SecurityFinding Your Way in Container Security
Finding Your Way in Container Security
 
Blazor and more.pptx
Blazor and more.pptxBlazor and more.pptx
Blazor and more.pptx
 
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...
What is Node.js | Node.js Tutorial for Beginners | Node.js Modules | Node.js ...
 
Maven ppt
Maven pptMaven ppt
Maven ppt
 
Introduction to spring boot
Introduction to spring bootIntroduction to spring boot
Introduction to spring boot
 
Dot Net Core
Dot Net CoreDot Net Core
Dot Net Core
 
Creating Apps with .NET MAUI
Creating Apps with .NET MAUICreating Apps with .NET MAUI
Creating Apps with .NET MAUI
 
Angular Libraries & NPM
 Angular Libraries & NPM Angular Libraries & NPM
Angular Libraries & NPM
 
Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React Native
 
Docker in real life
Docker in real lifeDocker in real life
Docker in real life
 
Introducing Swagger
Introducing SwaggerIntroducing Swagger
Introducing Swagger
 
Flutter Tutorial For Beginners | Edureka
Flutter Tutorial For Beginners | EdurekaFlutter Tutorial For Beginners | Edureka
Flutter Tutorial For Beginners | Edureka
 
MSDN - ASP.NET MVC
MSDN - ASP.NET MVCMSDN - ASP.NET MVC
MSDN - ASP.NET MVC
 
Building beautiful apps with Google flutter
Building beautiful apps with Google flutterBuilding beautiful apps with Google flutter
Building beautiful apps with Google flutter
 
React Native
React NativeReact Native
React Native
 
How native is React Native? | React Native vs Native App Development
How native is React Native? | React Native vs Native App DevelopmentHow native is React Native? | React Native vs Native App Development
How native is React Native? | React Native vs Native App Development
 
An Introduction to Maven
An Introduction to MavenAn Introduction to Maven
An Introduction to Maven
 
What is flutter and why should i care?
What is flutter and why should i care?What is flutter and why should i care?
What is flutter and why should i care?
 

Similar to Blazor

Online furniture management system
Online furniture management systemOnline furniture management system
Online furniture management system
Yesu Raj
 
Asp.net presentation by gajanand bohra
Asp.net presentation by gajanand bohraAsp.net presentation by gajanand bohra
Asp.net presentation by gajanand bohra
Gajanand Bohra
 
Developing an aspnet web application
Developing an aspnet web applicationDeveloping an aspnet web application
Developing an aspnet web application
Rahul Bansal
 

Similar to Blazor (20)

.NET Fest 2018. Dino Esposito. ASP.NET Blazor—the C# Angular or the return of...
.NET Fest 2018. Dino Esposito. ASP.NET Blazor—the C# Angular or the return of....NET Fest 2018. Dino Esposito. ASP.NET Blazor—the C# Angular or the return of...
.NET Fest 2018. Dino Esposito. ASP.NET Blazor—the C# Angular or the return of...
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
【BS1】What’s new in visual studio 2022 and c# 10
【BS1】What’s new in visual studio 2022 and c# 10【BS1】What’s new in visual studio 2022 and c# 10
【BS1】What’s new in visual studio 2022 and c# 10
 
Amir Zuker: Building web apps with web assembly and blazor - Architecture Nex...
Amir Zuker: Building web apps with web assembly and blazor - Architecture Nex...Amir Zuker: Building web apps with web assembly and blazor - Architecture Nex...
Amir Zuker: Building web apps with web assembly and blazor - Architecture Nex...
 
Visual studio
Visual studioVisual studio
Visual studio
 
.NET Conf 2019 高雄場 - .NET Core 3.0
.NET Conf 2019 高雄場 - .NET Core 3.0.NET Conf 2019 高雄場 - .NET Core 3.0
.NET Conf 2019 高雄場 - .NET Core 3.0
 
Webhouse
WebhouseWebhouse
Webhouse
 
Asp.net
Asp.netAsp.net
Asp.net
 
Online furniture management system
Online furniture management systemOnline furniture management system
Online furniture management system
 
Full stack web development with c# and web assembly - Blazor.Net
Full stack web development with c# and web assembly - Blazor.NetFull stack web development with c# and web assembly - Blazor.Net
Full stack web development with c# and web assembly - Blazor.Net
 
Asp.netrole
Asp.netroleAsp.netrole
Asp.netrole
 
Asp.net presentation by gajanand bohra
Asp.net presentation by gajanand bohraAsp.net presentation by gajanand bohra
Asp.net presentation by gajanand bohra
 
Developing an aspnet web application
Developing an aspnet web applicationDeveloping an aspnet web application
Developing an aspnet web application
 
A comprehensive software infrastructure of .Net
A comprehensive software infrastructure of .Net  A comprehensive software infrastructure of .Net
A comprehensive software infrastructure of .Net
 
Blazor - the successor of angular/react/vue?
Blazor - the successor of angular/react/vue?Blazor - the successor of angular/react/vue?
Blazor - the successor of angular/react/vue?
 
Javascript handbook
Javascript handbook Javascript handbook
Javascript handbook
 
1..Net Framework Architecture-(c#)
1..Net Framework Architecture-(c#)1..Net Framework Architecture-(c#)
1..Net Framework Architecture-(c#)
 
DOT NET TRaining
DOT NET TRainingDOT NET TRaining
DOT NET TRaining
 
ASP.NET Core 101
ASP.NET Core 101ASP.NET Core 101
ASP.NET Core 101
 
Node J pdf.docx
Node J pdf.docxNode J pdf.docx
Node J pdf.docx
 

More from Sandun Perera

Introduction to NuoDB
Introduction to NuoDBIntroduction to NuoDB
Introduction to NuoDB
Sandun Perera
 

More from Sandun Perera (12)

Azure EventGrid vs Azure ServiceBus.pptx
Azure EventGrid vs Azure ServiceBus.pptxAzure EventGrid vs Azure ServiceBus.pptx
Azure EventGrid vs Azure ServiceBus.pptx
 
iUpgradable
iUpgradableiUpgradable
iUpgradable
 
Bootstrap 5 whats new
Bootstrap 5   whats newBootstrap 5   whats new
Bootstrap 5 whats new
 
Angular Form Validations
Angular Form ValidationsAngular Form Validations
Angular Form Validations
 
Introduction to NuoDB
Introduction to NuoDBIntroduction to NuoDB
Introduction to NuoDB
 
Microsoft Dynamics CRM 2013 Customization
Microsoft Dynamics CRM 2013 CustomizationMicrosoft Dynamics CRM 2013 Customization
Microsoft Dynamics CRM 2013 Customization
 
SQL Windowing
SQL WindowingSQL Windowing
SQL Windowing
 
Windows PowerShell
Windows PowerShellWindows PowerShell
Windows PowerShell
 
Car care
Car careCar care
Car care
 
Tale of the photo camera
Tale of the photo cameraTale of the photo camera
Tale of the photo camera
 
Visual Studio Unleashed - Tips and Tricks
Visual Studio Unleashed - Tips and TricksVisual Studio Unleashed - Tips and Tricks
Visual Studio Unleashed - Tips and Tricks
 
What’s new in Visual Studio 2010
What’s new in Visual Studio 2010What’s new in Visual Studio 2010
What’s new in Visual Studio 2010
 

Recently uploaded

Recently uploaded (20)

Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
Driving Innovation: Scania's API Revolution with WSO2
Driving Innovation: Scania's API Revolution with WSO2Driving Innovation: Scania's API Revolution with WSO2
Driving Innovation: Scania's API Revolution with WSO2
 
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
 
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
 
WSO2CON2024 - Why Should You Consider Ballerina for Your Next Integration
WSO2CON2024 - Why Should You Consider Ballerina for Your Next IntegrationWSO2CON2024 - Why Should You Consider Ballerina for Your Next Integration
WSO2CON2024 - Why Should You Consider Ballerina for Your Next Integration
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
WSO2Con2024 - Low-Code Integration Tooling
WSO2Con2024 - Low-Code Integration ToolingWSO2Con2024 - Low-Code Integration Tooling
WSO2Con2024 - Low-Code Integration Tooling
 
WSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AI
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Era
 
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
 
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of TransformationWSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
 

Blazor

  • 2. z Flow  Intro  Pre-requisites  Blah blah blah  Demo  Discussion
  • 3. z Intro  Blazor is a single-page web app framework built on .NET that runs in the browser with WebAssembly.  Razor on browser => Blazor  WebAssembly.js  Mono.js  Azure support
  • 4. z Why use .NET in the browser?  Stability and consistency  Modern innovative languages  Industry-leading tools  Speed and scalability  Full-stack development that leverages existing skills  Wide browser support
  • 5. z How Blazor runs .NET in the browser  Running .NET code inside web browsers is made possible by a relatively new technology, WebAssembly (wasm). WebAssembly is an open web standard and is supported in web browsers without plugins.  WebAssembly code can access the full functionality of the browser via JavaScript interop. Also WebAssembly code runs in the same trusted sandbox as JavaScript for security.  C# code files and Razor files are compiled into .NET assemblies.  The assemblies and the .NET runtime are downloaded to the browser.  Blazor uses JavaScript to bootstrap the .NET runtime and configures the runtime to load required assembly references. Document object model (DOM) manipulation and browser API calls are handled by the Blazor runtime via JavaScript interoperability.  To support older browsers that don't support WebAssembly, Blazor falls back to using an asm.js-based .NET runtime.
  • 6. z Blazor components  Blazor apps are built with components. A component is a piece of UI, such as a page, dialog, or data entry form. Components can be nested, reused, and shared between projects.  In Blazor, a component is a .NET class. The class can either be written directly, as a C# class (*.cs), or more commonly in the form of a Razor markup page (*.cshtml).
  • 7. z Infrastructure  Blazor offers the core facilities that most apps require, including:  Layouts  Routing  Dependency injection  All of these features are optional. When one of these features isn't used in an app, the implementation is stripped out of the app when published by the Intermediate Language (IL) Linker.
  • 8. z Code sharing and .NET Standard  Blazor supports .NET Standard 2.0 or higher. APIs that aren't applicable inside a web browser (for example, accessing the file system, opening a socket, threading, and other features) throw PlatformNotSupportedException. .NET Standard class libraries can be shared across server code and in browser- based apps.
  • 9. z JavaScript interop  For apps that require third-party JavaScript libraries and browser APIs, WebAssembly is designed to interoperate with JavaScript. Blazor is capable of using any library or API that JavaScript is able to use. C# code can call into JavaScript code, and JavaScript code can call into C# code.
  • 10. z Optimization  For client-side apps, payload size is critical. Blazor optimizes payload size to reduce download times. For example, unused parts of .NET assemblies are removed during the build process, HTTP responses are compressed, and the .NET runtime and assemblies are cached in the browser.
  • 11. z Deployment  Use Blazor to build a pure standalone client-side app or a full-stack ASP.NET Core app that contains both server and client apps:  In a standalone client-side app, the Blazor app is compiled into a dist folder that only contains static files. The files can be hosted on Azure App Service, GitHub Pages, IIS (configured as a static file server), Node.js servers, and many other servers and services. .NET isn't required on the server in production.  In a full-stack ASP.NET Core app, code can be shared between server and client apps. The resulting ASP.NET Core server app, which serves the Blazor client-side UI and other server-side API endpoints, can be built and deployed to any cloud or on premise host supported by ASP.NET Core.
  • 12. z Pre-requisites  .NET Core 2.1 SDK (2.1.402 or later).  Visual Studio 2017 (15.8 or later) with the ASP.NET and web development workload selected.  The latest Blazor Language Services extension from the Visual Studio Marketplace.  Knowledge on web development and Razor syntaxes  General purpose web browser 
  • 13. z The Stack Dev time C# / Razor source files YourApp.dll netstandard .NET assembly files mono.wasm WebAssembly binary executed natively Browser APIs visible DOM, HTTP requests, etc Runtime (in browser)
  • 15. z Lifecycle methods  OnInitAsync() / OnInit()  OnParametersSetAsync() / OnParametersSet()  OnAfterRenderAsync() / OnAfterRender()
  • 16. z Routing  @page "/BlazorRoute"  @page "/DifferentBlazorRoute“  @page "/RouteParameter/{text}“  @page "/Users/{Id:int}"
  • 17. z Separation of Concern @page "/BlazorRocks" @* The inherit directive provides the properties and methods of the BlazorRocksBase class to this component. *@ @inherits BlazorRocksBase <h1>@BlazorRocksText</h1> using Microsoft.AspNetCore.Blazor.Components; public class BlazorRocksBase : BlazorComponent { public string BlazorRocksText { get; set; } = "Blazor rocks the browser!"; }
  • 18. z Layouts @layout MasterLayout @page "/master-data" <h2>Master Data Management</h2> @layout MasterDataLayout @page "/master-data/customers" <h1>Customer Maintenance</h1>
  • 19. z Dependency Injection public void ConfigureServices(IServiceCollection services) { services.AddScoped<IDataAccess, DataAccess>(); } @page "/customer-list" @using Services @inject IDataAccess DataRepository
  • 20. z JavaScript <body> <app>Loading...</app> <script src="exampleJsInterop.js"></script> </body> public static Task<string> Display(string welcomeMessage) { // displayWelcome is implemented in wwwroot/exampleJsInterop.js return JSRuntime.Current.InvokeAsync<string>( "exampleJsFunctions.displayWelcome", welcomeMessage); }
  • 21. z Publish and Deploy  dotnet publish -c Release  With the use of commands, it is configurable for Azure WebApp deployment and hosting.
  • 22.