├── .gitignore ├── README.md ├── demos ├── 01-BlazorClient │ ├── BlazorGridComponent │ │ ├── BlazorGrid.razor │ │ ├── BlazorGridComponent.csproj │ │ ├── BlazorGridDemo.PNG │ │ └── content │ │ │ └── styles.css │ ├── BlazorSample.Client │ │ ├── App.razor │ │ ├── BlazorSample.Client.csproj │ │ ├── Pages │ │ │ ├── Counter.razor │ │ │ ├── FetchData.razor │ │ │ ├── Index.razor │ │ │ └── _Imports.razor │ │ ├── Program.cs │ │ ├── Shared │ │ │ ├── MainLayout.razor │ │ │ ├── NavMenu.razor │ │ │ └── SurveyPrompt.razor │ │ ├── Startup.cs │ │ ├── _Imports.razor │ │ └── wwwroot │ │ │ ├── css │ │ │ ├── bootstrap │ │ │ │ ├── bootstrap.min.css │ │ │ │ └── bootstrap.min.css.map │ │ │ ├── open-iconic │ │ │ │ ├── FONT-LICENSE │ │ │ │ ├── ICON-LICENSE │ │ │ │ ├── README.md │ │ │ │ └── font │ │ │ │ │ ├── css │ │ │ │ │ └── open-iconic-bootstrap.min.css │ │ │ │ │ └── fonts │ │ │ │ │ ├── open-iconic.eot │ │ │ │ │ ├── open-iconic.otf │ │ │ │ │ ├── open-iconic.svg │ │ │ │ │ ├── open-iconic.ttf │ │ │ │ │ └── open-iconic.woff │ │ │ └── site.css │ │ │ └── index.html │ ├── BlazorSample.Server │ │ ├── BlazorSample.Server.csproj │ │ ├── Controllers │ │ │ └── SampleDataController.cs │ │ ├── Program.cs │ │ └── Startup.cs │ ├── BlazorSample.Shared │ │ ├── BlazorSample.Shared.csproj │ │ └── WeatherForecast.cs │ ├── BlazorSample.sln │ └── global.json ├── 02-FullStackDemo │ ├── BlazorInsider.Api │ │ ├── BlazorInsider.Api.csproj │ │ ├── Program.cs │ │ ├── Protos │ │ │ └── ordershandler.proto │ │ ├── Services │ │ │ └── OrdersManagerService.cs │ │ ├── Startup.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ ├── BlazorInsider.App │ │ ├── App.razor │ │ ├── BlazorInsider.App.csproj │ │ ├── Pages │ │ │ ├── About.razor │ │ │ ├── Index.razor │ │ │ ├── _Host.cshtml │ │ │ └── _Imports.razor │ │ ├── Program.cs │ │ ├── Protos │ │ │ └── ordershandler.proto │ │ ├── Shared │ │ │ ├── MainLayout.razor │ │ │ └── NavMenu.razor │ │ ├── Startup.cs │ │ ├── _Imports.razor │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ └── wwwroot │ │ │ ├── css │ │ │ ├── bootstrap │ │ │ │ ├── bootstrap.min.css │ │ │ │ └── bootstrap.min.css.map │ │ │ ├── open-iconic │ │ │ │ ├── FONT-LICENSE │ │ │ │ ├── ICON-LICENSE │ │ │ │ ├── README.md │ │ │ │ └── font │ │ │ │ │ ├── css │ │ │ │ │ └── open-iconic-bootstrap.min.css │ │ │ │ │ └── fonts │ │ │ │ │ ├── open-iconic.eot │ │ │ │ │ ├── open-iconic.otf │ │ │ │ │ ├── open-iconic.svg │ │ │ │ │ ├── open-iconic.ttf │ │ │ │ │ └── open-iconic.woff │ │ │ └── site.css │ │ │ └── favicon.ico │ ├── BlazorInsider.Shared │ │ ├── BlazorInsider.Shared.csproj │ │ ├── Model │ │ │ └── Order.cs │ │ └── Services │ │ │ └── DatabaseService.cs │ ├── BlazorInsider.Worker │ │ ├── BlazorInsider.Worker.csproj │ │ ├── Program.cs │ │ ├── Protos │ │ │ └── ordershandler.proto │ │ ├── Worker.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ ├── BlazorInsider.sln │ └── global.json └── readme.txt └── slides ├── 001-full stack .net core 3.0.pptx ├── 002-net core is the future.pptx ├── 2019-08-12 c# full stack asp.net core 3.0.pptx ├── 2019-09-10 c# full stack asp.net core 3.0.pptx └── 2019-10-10 Hands On Application Develoment with .net core 3.0.pptx /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.suo 8 | *.user 9 | *.userosscache 10 | *.sln.docstates 11 | 12 | # User-specific files (MonoDevelop/Xamarin Studio) 13 | *.userprefs 14 | 15 | # Build results 16 | [Dd]ebug/ 17 | [Dd]ebugPublic/ 18 | [Rr]elease/ 19 | [Rr]eleases/ 20 | x64/ 21 | x86/ 22 | bld/ 23 | [Bb]in/ 24 | [Oo]bj/ 25 | [Ll]og/ 26 | 27 | # Visual Studio 2015/2017 cache/options directory 28 | .vs/ 29 | # Uncomment if you have tasks that create the project's static files in wwwroot 30 | #wwwroot/ 31 | 32 | # Visual Studio 2017 auto generated files 33 | Generated\ Files/ 34 | 35 | # MSTest test Results 36 | [Tt]est[Rr]esult*/ 37 | [Bb]uild[Ll]og.* 38 | 39 | # NUNIT 40 | *.VisualState.xml 41 | TestResult.xml 42 | 43 | # Build Results of an ATL Project 44 | [Dd]ebugPS/ 45 | [Rr]eleasePS/ 46 | dlldata.c 47 | 48 | # Benchmark Results 49 | BenchmarkDotNet.Artifacts/ 50 | 51 | # .NET Core 52 | project.lock.json 53 | project.fragment.lock.json 54 | artifacts/ 55 | **/Properties/launchSettings.json 56 | 57 | # StyleCop 58 | StyleCopReport.xml 59 | 60 | # Files built by Visual Studio 61 | *_i.c 62 | *_p.c 63 | *_i.h 64 | *.ilk 65 | *.meta 66 | *.obj 67 | *.iobj 68 | *.pch 69 | *.pdb 70 | *.ipdb 71 | *.pgc 72 | *.pgd 73 | *.rsp 74 | *.sbr 75 | *.tlb 76 | *.tli 77 | *.tlh 78 | *.tmp 79 | *.tmp_proj 80 | *.log 81 | *.vspscc 82 | *.vssscc 83 | .builds 84 | *.pidb 85 | *.svclog 86 | *.scc 87 | 88 | # Chutzpah Test files 89 | _Chutzpah* 90 | 91 | # Visual C++ cache files 92 | ipch/ 93 | *.aps 94 | *.ncb 95 | *.opendb 96 | *.opensdf 97 | *.sdf 98 | *.cachefile 99 | *.VC.db 100 | *.VC.VC.opendb 101 | 102 | # Visual Studio profiler 103 | *.psess 104 | *.vsp 105 | *.vspx 106 | *.sap 107 | 108 | # Visual Studio Trace Files 109 | *.e2e 110 | 111 | # TFS 2012 Local Workspace 112 | $tf/ 113 | 114 | # Guidance Automation Toolkit 115 | *.gpState 116 | 117 | # ReSharper is a .NET coding add-in 118 | _ReSharper*/ 119 | *.[Rr]e[Ss]harper 120 | *.DotSettings.user 121 | 122 | # JustCode is a .NET coding add-in 123 | .JustCode 124 | 125 | # TeamCity is a build add-in 126 | _TeamCity* 127 | 128 | # DotCover is a Code Coverage Tool 129 | *.dotCover 130 | 131 | # AxoCover is a Code Coverage Tool 132 | .axoCover/* 133 | !.axoCover/settings.json 134 | 135 | # Visual Studio code coverage results 136 | *.coverage 137 | *.coveragexml 138 | 139 | # NCrunch 140 | _NCrunch_* 141 | .*crunch*.local.xml 142 | nCrunchTemp_* 143 | 144 | # MightyMoose 145 | *.mm.* 146 | AutoTest.Net/ 147 | 148 | # Web workbench (sass) 149 | .sass-cache/ 150 | 151 | # Installshield output folder 152 | [Ee]xpress/ 153 | 154 | # DocProject is a documentation generator add-in 155 | DocProject/buildhelp/ 156 | DocProject/Help/*.HxT 157 | DocProject/Help/*.HxC 158 | DocProject/Help/*.hhc 159 | DocProject/Help/*.hhk 160 | DocProject/Help/*.hhp 161 | DocProject/Help/Html2 162 | DocProject/Help/html 163 | 164 | # Click-Once directory 165 | publish/ 166 | 167 | # Publish Web Output 168 | *.[Pp]ublish.xml 169 | *.azurePubxml 170 | # Note: Comment the next line if you want to checkin your web deploy settings, 171 | # but database connection strings (with potential passwords) will be unencrypted 172 | *.pubxml 173 | *.publishproj 174 | 175 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 176 | # checkin your Azure Web App publish settings, but sensitive information contained 177 | # in these scripts will be unencrypted 178 | PublishScripts/ 179 | 180 | # NuGet Packages 181 | *.nupkg 182 | # The packages folder can be ignored because of Package Restore 183 | **/[Pp]ackages/* 184 | # except build/, which is used as an MSBuild target. 185 | !**/[Pp]ackages/build/ 186 | # Uncomment if necessary however generally it will be regenerated when needed 187 | #!**/[Pp]ackages/repositories.config 188 | # NuGet v3's project.json files produces more ignorable files 189 | *.nuget.props 190 | *.nuget.targets 191 | 192 | # Microsoft Azure Build Output 193 | csx/ 194 | *.build.csdef 195 | 196 | # Microsoft Azure Emulator 197 | ecf/ 198 | rcf/ 199 | 200 | # Windows Store app package directories and files 201 | AppPackages/ 202 | BundleArtifacts/ 203 | Package.StoreAssociation.xml 204 | _pkginfo.txt 205 | *.appx 206 | 207 | # Visual Studio cache files 208 | # files ending in .cache can be ignored 209 | *.[Cc]ache 210 | # but keep track of directories ending in .cache 211 | !*.[Cc]ache/ 212 | 213 | # Others 214 | ClientBin/ 215 | ~$* 216 | *~ 217 | *.dbmdl 218 | *.dbproj.schemaview 219 | *.jfm 220 | *.pfx 221 | *.publishsettings 222 | orleans.codegen.cs 223 | 224 | # Including strong name files can present a security risk 225 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 226 | #*.snk 227 | 228 | # Since there are multiple workflows, uncomment next line to ignore bower_components 229 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 230 | #bower_components/ 231 | 232 | # RIA/Silverlight projects 233 | Generated_Code/ 234 | 235 | # Backup & report files from converting an old project file 236 | # to a newer Visual Studio version. Backup files are not needed, 237 | # because we have git ;-) 238 | _UpgradeReport_Files/ 239 | Backup*/ 240 | UpgradeLog*.XML 241 | UpgradeLog*.htm 242 | ServiceFabricBackup/ 243 | *.rptproj.bak 244 | 245 | # SQL Server files 246 | *.mdf 247 | *.ldf 248 | *.ndf 249 | 250 | # Business Intelligence projects 251 | *.rdl.data 252 | *.bim.layout 253 | *.bim_*.settings 254 | *.rptproj.rsuser 255 | 256 | # Microsoft Fakes 257 | FakesAssemblies/ 258 | 259 | # GhostDoc plugin setting file 260 | *.GhostDoc.xml 261 | 262 | # Node.js Tools for Visual Studio 263 | .ntvs_analysis.dat 264 | node_modules/ 265 | 266 | # Visual Studio 6 build log 267 | *.plg 268 | 269 | # Visual Studio 6 workspace options file 270 | *.opt 271 | 272 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 273 | *.vbw 274 | 275 | # Visual Studio LightSwitch build output 276 | **/*.HTMLClient/GeneratedArtifacts 277 | **/*.DesktopClient/GeneratedArtifacts 278 | **/*.DesktopClient/ModelManifest.xml 279 | **/*.Server/GeneratedArtifacts 280 | **/*.Server/ModelManifest.xml 281 | _Pvt_Extensions 282 | 283 | # Paket dependency manager 284 | .paket/paket.exe 285 | paket-files/ 286 | 287 | # FAKE - F# Make 288 | .fake/ 289 | 290 | # JetBrains Rider 291 | .idea/ 292 | *.sln.iml 293 | 294 | # CodeRush 295 | .cr/ 296 | 297 | # Python Tools for Visual Studio (PTVS) 298 | __pycache__/ 299 | *.pyc 300 | 301 | # Cake - Uncomment if you are using it 302 | # tools/** 303 | # !tools/packages.config 304 | 305 | # Tabs Studio 306 | *.tss 307 | 308 | # Telerik's JustMock configuration file 309 | *.jmconfig 310 | 311 | # BizTalk build output 312 | *.btp.cs 313 | *.btm.cs 314 | *.odx.cs 315 | *.xsd.cs 316 | 317 | # OpenCover UI analysis results 318 | OpenCover/ 319 | 320 | # Azure Stream Analytics local run output 321 | ASALocalRun/ 322 | 323 | # MSBuild Binary and Structured Log 324 | *.binlog 325 | 326 | # NVidia Nsight GPU debugger configuration file 327 | *.nvuser 328 | 329 | # MFractors (Xamarin productivity tool) working folder 330 | .mfractor/ 331 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Talks.FullStackAspNetCore30 2 | Demos and slides used for Full Stack C# Development with .NET Core 3.0 Talk - highlighting Blazor, Worker Services and gRPC. 3 | -------------------------------------------------------------------------------- /demos/01-BlazorClient/BlazorGridComponent/BlazorGrid.razor: -------------------------------------------------------------------------------- 1 | @typeparam TableItem 2 | 3 | 4 | 5 | @GridHeader 6 | 7 | 8 | @foreach (var item in ItemList) 9 | { 10 | @GridRow(item) 11 | } 12 | 13 |
14 | 33 | 34 | @code { 35 | int totalPages; 36 | int curPage; 37 | int pagerSize; 38 | 39 | int startPage; 40 | int endPage; 41 | 42 | /// 43 | /// Header for BlazorGrid. 44 | /// 45 | [Parameter] 46 | RenderFragment GridHeader { get; set; } 47 | 48 | /// 49 | /// Rows for BlazorGrid. 50 | /// 51 | [Parameter] 52 | RenderFragment GridRow { get; set; } 53 | 54 | /// 55 | /// The list of item supplied to the BlazorGrid. 56 | /// 57 | [Parameter] 58 | IEnumerable Items { get; set; } 59 | 60 | /// 61 | /// Size of each page of BlazorGrid. This is a required field. 62 | /// 63 | [Parameter] 64 | int PageSize { get; set; } 65 | 66 | IEnumerable ItemList { get; set; } 67 | 68 | protected override async Task OnInitAsync() 69 | { 70 | pagerSize = 5; 71 | curPage = 1; 72 | 73 | ItemList = Items.Skip((curPage - 1) * PageSize).Take(PageSize); 74 | totalPages = (int)Math.Ceiling(Items.Count() / (decimal)PageSize); 75 | 76 | SetPagerSize("forward"); 77 | } 78 | 79 | public void updateList(int currentPage) 80 | { 81 | ItemList = Items.Skip((currentPage - 1) * PageSize).Take(PageSize); 82 | curPage = currentPage; 83 | this.StateHasChanged(); 84 | } 85 | 86 | public void SetPagerSize(string direction) 87 | { 88 | if (direction == "forward" && endPage < totalPages) 89 | { 90 | startPage = endPage + 1; 91 | if (endPage + pagerSize < totalPages) 92 | { 93 | endPage = startPage + pagerSize - 1; 94 | } 95 | else 96 | { 97 | endPage = totalPages; 98 | } 99 | this.StateHasChanged(); 100 | } 101 | else if (direction == "back" && startPage > 1) 102 | { 103 | endPage = startPage - 1; 104 | startPage = startPage - pagerSize; 105 | } 106 | } 107 | 108 | public void NavigateToPage(string direction) 109 | { 110 | if (direction == "next") 111 | { 112 | if (curPage < totalPages) 113 | { 114 | if (curPage == endPage) 115 | { 116 | SetPagerSize("forward"); 117 | } 118 | curPage += 1; 119 | } 120 | } 121 | else if (direction == "previous") 122 | { 123 | if (curPage > 1) 124 | { 125 | if (curPage == startPage) 126 | { 127 | SetPagerSize("back"); 128 | } 129 | curPage -= 1; 130 | } 131 | } 132 | 133 | updateList(curPage); 134 | } 135 | } -------------------------------------------------------------------------------- /demos/01-BlazorClient/BlazorGridComponent/BlazorGridComponent.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard2.0 5 | Library 6 | true 7 | false 8 | 7.3 9 | 3.0 10 | BlazorGrid 11 | Ankit Sharma 12 | BlazorGrid 13 | https://github.com/AnkitSharma-007/BlazorGrid 14 | https://github.com/AnkitSharma-007/BlazorGrid/blob/master/BlazorGridComponent/LICENSE 15 | ASP.NETCore Blazor BlazorGrid Blazor-Component 16 | A reusable grid component for Blazor. 17 | https://github.com/AnkitSharma-007/BlazorGrid 18 | git 19 | (c) Ankit Sharma 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /demos/01-BlazorClient/BlazorGridComponent/BlazorGridDemo.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottdock/Talks.FullStackAspNetCore30/d5bdec29054fcc33cb05be6fb466cec9d0c87c2f/demos/01-BlazorClient/BlazorGridComponent/BlazorGridDemo.PNG -------------------------------------------------------------------------------- /demos/01-BlazorClient/BlazorGridComponent/content/styles.css: -------------------------------------------------------------------------------- 1 | .blazor-grid-header { 2 | text-align: center; 3 | border-collapse: collapse; 4 | background: #ebebeb; 5 | } 6 | 7 | .blazor-row-item:hover { 8 | background: #9fcdf4; 9 | } 10 | 11 | th, td { 12 | padding: 15px; 13 | border: 1px solid #d1d1d1; 14 | text-align: center; 15 | } 16 | 17 | .pagebutton { 18 | margin-right: 5px; 19 | margin-top: 5px; 20 | } 21 | 22 | .currentpage { 23 | background-color: dodgerblue; 24 | color: white; 25 | } 26 | -------------------------------------------------------------------------------- /demos/01-BlazorClient/BlazorSample.Client/App.razor: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /demos/01-BlazorClient/BlazorSample.Client/BlazorSample.Client.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | Exe 6 | 7 | https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json; 8 | https://dotnet.myget.org/F/blazor-dev/api/v3/index.json; 9 | 10 | 7.3 11 | 3.0 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /demos/01-BlazorClient/BlazorSample.Client/Pages/Counter.razor: -------------------------------------------------------------------------------- 1 | @page "/counter" 2 | 3 |

Counter

4 | 5 |

Current count: @currentCount

6 | 7 | 8 | 9 | @code { 10 | int currentCount = 0; 11 | 12 | void IncrementCount() 13 | { 14 | currentCount++; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /demos/01-BlazorClient/BlazorSample.Client/Pages/FetchData.razor: -------------------------------------------------------------------------------- 1 | @page "/fetchdata" 2 | @using BlazorSample.Shared 3 | @using BlazorGridComponent 4 | @inject HttpClient Http 5 | 6 |

Weather forecast

7 | 8 |

This component demonstrates fetching data from the server.

9 | 10 | @if (forecasts == null) 11 | { 12 |

Loading...

13 | } 14 | else 15 | { 16 | 17 | 18 | Date 19 | Temp. (C) 20 | Temp. (F) 21 | Summary 22 | 23 | 24 | @context.Date.ToShortDateString() 25 | @context.TemperatureC 26 | @context.TemperatureF 27 | @context.Summary 28 | 29 | 30 | 31 | } 32 | 33 | @code { 34 | WeatherForecast[] forecasts; 35 | 36 | protected override async Task OnInitAsync() 37 | { 38 | forecasts = await Http.GetJsonAsync("api/SampleData/WeatherForecasts"); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /demos/01-BlazorClient/BlazorSample.Client/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 |

Hello, world!

4 | 5 | Welcome to your new app. 6 | 7 | 8 | -------------------------------------------------------------------------------- /demos/01-BlazorClient/BlazorSample.Client/Pages/_Imports.razor: -------------------------------------------------------------------------------- 1 | @layout MainLayout 2 | -------------------------------------------------------------------------------- /demos/01-BlazorClient/BlazorSample.Client/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Blazor.Hosting; 2 | 3 | namespace BlazorSample.Client 4 | { 5 | public class Program 6 | { 7 | public static void Main(string[] args) 8 | { 9 | CreateHostBuilder(args).Build().Run(); 10 | } 11 | 12 | public static IWebAssemblyHostBuilder CreateHostBuilder(string[] args) => 13 | BlazorWebAssemblyHost.CreateDefaultBuilder() 14 | .UseBlazorStartup(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /demos/01-BlazorClient/BlazorSample.Client/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | 6 | 7 |
8 |
9 | About 10 |
11 | 12 |
13 | @Body 14 |
15 |
16 | -------------------------------------------------------------------------------- /demos/01-BlazorClient/BlazorSample.Client/Shared/NavMenu.razor: -------------------------------------------------------------------------------- 1 |  7 | 8 |
9 | 26 |
27 | 28 | @functions { 29 | bool collapseNavMenu = true; 30 | 31 | string NavMenuCssClass => collapseNavMenu ? "collapse" : null; 32 | 33 | void ToggleNavMenu() 34 | { 35 | collapseNavMenu = !collapseNavMenu; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /demos/01-BlazorClient/BlazorSample.Client/Shared/SurveyPrompt.razor: -------------------------------------------------------------------------------- 1 |  11 | 12 | @functions { 13 | // Demonstrates how a parent component can supply parameters 14 | [Parameter] string Title { get; set; } 15 | } 16 | -------------------------------------------------------------------------------- /demos/01-BlazorClient/BlazorSample.Client/Startup.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components.Builder; 2 | using Microsoft.Extensions.DependencyInjection; 3 | 4 | namespace BlazorSample.Client 5 | { 6 | public class Startup 7 | { 8 | public void ConfigureServices(IServiceCollection services) 9 | { 10 | } 11 | 12 | public void Configure(IComponentsApplicationBuilder app) 13 | { 14 | app.AddComponent("app"); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /demos/01-BlazorClient/BlazorSample.Client/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using Microsoft.AspNetCore.Components.Forms 3 | @using Microsoft.AspNetCore.Components.Layouts 4 | @using Microsoft.AspNetCore.Components.Routing 5 | @using Microsoft.JSInterop 6 | @using BlazorSample.Client 7 | @using BlazorSample.Client.Shared 8 | -------------------------------------------------------------------------------- /demos/01-BlazorClient/BlazorSample.Client/wwwroot/css/open-iconic/FONT-LICENSE: -------------------------------------------------------------------------------- 1 | SIL OPEN FONT LICENSE Version 1.1 2 | 3 | Copyright (c) 2014 Waybury 4 | 5 | PREAMBLE 6 | The goals of the Open Font License (OFL) are to stimulate worldwide 7 | development of collaborative font projects, to support the font creation 8 | efforts of academic and linguistic communities, and to provide a free and 9 | open framework in which fonts may be shared and improved in partnership 10 | with others. 11 | 12 | The OFL allows the licensed fonts to be used, studied, modified and 13 | redistributed freely as long as they are not sold by themselves. The 14 | fonts, including any derivative works, can be bundled, embedded, 15 | redistributed and/or sold with any software provided that any reserved 16 | names are not used by derivative works. The fonts and derivatives, 17 | however, cannot be released under any other type of license. The 18 | requirement for fonts to remain under this license does not apply 19 | to any document created using the fonts or their derivatives. 20 | 21 | DEFINITIONS 22 | "Font Software" refers to the set of files released by the Copyright 23 | Holder(s) under this license and clearly marked as such. This may 24 | include source files, build scripts and documentation. 25 | 26 | "Reserved Font Name" refers to any names specified as such after the 27 | copyright statement(s). 28 | 29 | "Original Version" refers to the collection of Font Software components as 30 | distributed by the Copyright Holder(s). 31 | 32 | "Modified Version" refers to any derivative made by adding to, deleting, 33 | or substituting -- in part or in whole -- any of the components of the 34 | Original Version, by changing formats or by porting the Font Software to a 35 | new environment. 36 | 37 | "Author" refers to any designer, engineer, programmer, technical 38 | writer or other person who contributed to the Font Software. 39 | 40 | PERMISSION & CONDITIONS 41 | Permission is hereby granted, free of charge, to any person obtaining 42 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 43 | redistribute, and sell modified and unmodified copies of the Font 44 | Software, subject to the following conditions: 45 | 46 | 1) Neither the Font Software nor any of its individual components, 47 | in Original or Modified Versions, may be sold by itself. 48 | 49 | 2) Original or Modified Versions of the Font Software may be bundled, 50 | redistributed and/or sold with any software, provided that each copy 51 | contains the above copyright notice and this license. These can be 52 | included either as stand-alone text files, human-readable headers or 53 | in the appropriate machine-readable metadata fields within text or 54 | binary files as long as those fields can be easily viewed by the user. 55 | 56 | 3) No Modified Version of the Font Software may use the Reserved Font 57 | Name(s) unless explicit written permission is granted by the corresponding 58 | Copyright Holder. This restriction only applies to the primary font name as 59 | presented to the users. 60 | 61 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 62 | Software shall not be used to promote, endorse or advertise any 63 | Modified Version, except to acknowledge the contribution(s) of the 64 | Copyright Holder(s) and the Author(s) or with their explicit written 65 | permission. 66 | 67 | 5) The Font Software, modified or unmodified, in part or in whole, 68 | must be distributed entirely under this license, and must not be 69 | distributed under any other license. The requirement for fonts to 70 | remain under this license does not apply to any document created 71 | using the Font Software. 72 | 73 | TERMINATION 74 | This license becomes null and void if any of the above conditions are 75 | not met. 76 | 77 | DISCLAIMER 78 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 79 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 80 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 81 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 82 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 83 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 84 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 85 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 86 | OTHER DEALINGS IN THE FONT SOFTWARE. 87 | -------------------------------------------------------------------------------- /demos/01-BlazorClient/BlazorSample.Client/wwwroot/css/open-iconic/ICON-LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Waybury 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /demos/01-BlazorClient/BlazorSample.Client/wwwroot/css/open-iconic/README.md: -------------------------------------------------------------------------------- 1 | [Open Iconic v1.1.1](http://useiconic.com/open) 2 | =========== 3 | 4 | ### Open Iconic is the open source sibling of [Iconic](http://useiconic.com). It is a hyper-legible collection of 223 icons with a tiny footprint—ready to use with Bootstrap and Foundation. [View the collection](http://useiconic.com/open#icons) 5 | 6 | 7 | 8 | ## What's in Open Iconic? 9 | 10 | * 223 icons designed to be legible down to 8 pixels 11 | * Super-light SVG files - 61.8 for the entire set 12 | * SVG sprite—the modern replacement for icon fonts 13 | * Webfont (EOT, OTF, SVG, TTF, WOFF), PNG and WebP formats 14 | * Webfont stylesheets (including versions for Bootstrap and Foundation) in CSS, LESS, SCSS and Stylus formats 15 | * PNG and WebP raster images in 8px, 16px, 24px, 32px, 48px and 64px. 16 | 17 | 18 | ## Getting Started 19 | 20 | #### For code samples and everything else you need to get started with Open Iconic, check out our [Icons](http://useiconic.com/open#icons) and [Reference](http://useiconic.com/open#reference) sections. 21 | 22 | ### General Usage 23 | 24 | #### Using Open Iconic's SVGs 25 | 26 | We like SVGs and we think they're the way to display icons on the web. Since Open Iconic are just basic SVGs, we suggest you display them like you would any other image (don't forget the `alt` attribute). 27 | 28 | ``` 29 | icon name 30 | ``` 31 | 32 | #### Using Open Iconic's SVG Sprite 33 | 34 | Open Iconic also comes in a SVG sprite which allows you to display all the icons in the set with a single request. It's like an icon font, without being a hack. 35 | 36 | Adding an icon from an SVG sprite is a little different than what you're used to, but it's still a piece of cake. *Tip: To make your icons easily style able, we suggest adding a general class to the* `` *tag and a unique class name for each different icon in the* `` *tag.* 37 | 38 | ``` 39 | 40 | 41 | 42 | ``` 43 | 44 | Sizing icons only needs basic CSS. All the icons are in a square format, so just set the `` tag with equal width and height dimensions. 45 | 46 | ``` 47 | .icon { 48 | width: 16px; 49 | height: 16px; 50 | } 51 | ``` 52 | 53 | Coloring icons is even easier. All you need to do is set the `fill` rule on the `` tag. 54 | 55 | ``` 56 | .icon-account-login { 57 | fill: #f00; 58 | } 59 | ``` 60 | 61 | To learn more about SVG Sprites, read [Chris Coyier's guide](http://css-tricks.com/svg-sprites-use-better-icon-fonts/). 62 | 63 | #### Using Open Iconic's Icon Font... 64 | 65 | 66 | ##### …with Bootstrap 67 | 68 | You can find our Bootstrap stylesheets in `font/css/open-iconic-bootstrap.{css, less, scss, styl}` 69 | 70 | 71 | ``` 72 | 73 | ``` 74 | 75 | 76 | ``` 77 | 78 | ``` 79 | 80 | ##### …with Foundation 81 | 82 | You can find our Foundation stylesheets in `font/css/open-iconic-foundation.{css, less, scss, styl}` 83 | 84 | ``` 85 | 86 | ``` 87 | 88 | 89 | ``` 90 | 91 | ``` 92 | 93 | ##### …on its own 94 | 95 | You can find our default stylesheets in `font/css/open-iconic.{css, less, scss, styl}` 96 | 97 | ``` 98 | 99 | ``` 100 | 101 | ``` 102 | 103 | ``` 104 | 105 | 106 | ## License 107 | 108 | ### Icons 109 | 110 | All code (including SVG markup) is under the [MIT License](http://opensource.org/licenses/MIT). 111 | 112 | ### Fonts 113 | 114 | All fonts are under the [SIL Licensed](http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web). 115 | -------------------------------------------------------------------------------- /demos/01-BlazorClient/BlazorSample.Client/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css: -------------------------------------------------------------------------------- 1 | @font-face{font-family:Icons;src:url(../fonts/open-iconic.eot);src:url(../fonts/open-iconic.eot?#iconic-sm) format('embedded-opentype'),url(../fonts/open-iconic.woff) format('woff'),url(../fonts/open-iconic.ttf) format('truetype'),url(../fonts/open-iconic.otf) format('opentype'),url(../fonts/open-iconic.svg#iconic-sm) format('svg');font-weight:400;font-style:normal}.oi{position:relative;top:1px;display:inline-block;speak:none;font-family:Icons;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.oi:empty:before{width:1em;text-align:center;box-sizing:content-box}.oi.oi-align-center:before{text-align:center}.oi.oi-align-left:before{text-align:left}.oi.oi-align-right:before{text-align:right}.oi.oi-flip-horizontal:before{-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.oi.oi-flip-vertical:before{-webkit-transform:scale(1,-1);-ms-transform:scale(-1,1);transform:scale(1,-1)}.oi.oi-flip-horizontal-vertical:before{-webkit-transform:scale(-1,-1);-ms-transform:scale(-1,1);transform:scale(-1,-1)}.oi-account-login:before{content:'\e000'}.oi-account-logout:before{content:'\e001'}.oi-action-redo:before{content:'\e002'}.oi-action-undo:before{content:'\e003'}.oi-align-center:before{content:'\e004'}.oi-align-left:before{content:'\e005'}.oi-align-right:before{content:'\e006'}.oi-aperture:before{content:'\e007'}.oi-arrow-bottom:before{content:'\e008'}.oi-arrow-circle-bottom:before{content:'\e009'}.oi-arrow-circle-left:before{content:'\e00a'}.oi-arrow-circle-right:before{content:'\e00b'}.oi-arrow-circle-top:before{content:'\e00c'}.oi-arrow-left:before{content:'\e00d'}.oi-arrow-right:before{content:'\e00e'}.oi-arrow-thick-bottom:before{content:'\e00f'}.oi-arrow-thick-left:before{content:'\e010'}.oi-arrow-thick-right:before{content:'\e011'}.oi-arrow-thick-top:before{content:'\e012'}.oi-arrow-top:before{content:'\e013'}.oi-audio-spectrum:before{content:'\e014'}.oi-audio:before{content:'\e015'}.oi-badge:before{content:'\e016'}.oi-ban:before{content:'\e017'}.oi-bar-chart:before{content:'\e018'}.oi-basket:before{content:'\e019'}.oi-battery-empty:before{content:'\e01a'}.oi-battery-full:before{content:'\e01b'}.oi-beaker:before{content:'\e01c'}.oi-bell:before{content:'\e01d'}.oi-bluetooth:before{content:'\e01e'}.oi-bold:before{content:'\e01f'}.oi-bolt:before{content:'\e020'}.oi-book:before{content:'\e021'}.oi-bookmark:before{content:'\e022'}.oi-box:before{content:'\e023'}.oi-briefcase:before{content:'\e024'}.oi-british-pound:before{content:'\e025'}.oi-browser:before{content:'\e026'}.oi-brush:before{content:'\e027'}.oi-bug:before{content:'\e028'}.oi-bullhorn:before{content:'\e029'}.oi-calculator:before{content:'\e02a'}.oi-calendar:before{content:'\e02b'}.oi-camera-slr:before{content:'\e02c'}.oi-caret-bottom:before{content:'\e02d'}.oi-caret-left:before{content:'\e02e'}.oi-caret-right:before{content:'\e02f'}.oi-caret-top:before{content:'\e030'}.oi-cart:before{content:'\e031'}.oi-chat:before{content:'\e032'}.oi-check:before{content:'\e033'}.oi-chevron-bottom:before{content:'\e034'}.oi-chevron-left:before{content:'\e035'}.oi-chevron-right:before{content:'\e036'}.oi-chevron-top:before{content:'\e037'}.oi-circle-check:before{content:'\e038'}.oi-circle-x:before{content:'\e039'}.oi-clipboard:before{content:'\e03a'}.oi-clock:before{content:'\e03b'}.oi-cloud-download:before{content:'\e03c'}.oi-cloud-upload:before{content:'\e03d'}.oi-cloud:before{content:'\e03e'}.oi-cloudy:before{content:'\e03f'}.oi-code:before{content:'\e040'}.oi-cog:before{content:'\e041'}.oi-collapse-down:before{content:'\e042'}.oi-collapse-left:before{content:'\e043'}.oi-collapse-right:before{content:'\e044'}.oi-collapse-up:before{content:'\e045'}.oi-command:before{content:'\e046'}.oi-comment-square:before{content:'\e047'}.oi-compass:before{content:'\e048'}.oi-contrast:before{content:'\e049'}.oi-copywriting:before{content:'\e04a'}.oi-credit-card:before{content:'\e04b'}.oi-crop:before{content:'\e04c'}.oi-dashboard:before{content:'\e04d'}.oi-data-transfer-download:before{content:'\e04e'}.oi-data-transfer-upload:before{content:'\e04f'}.oi-delete:before{content:'\e050'}.oi-dial:before{content:'\e051'}.oi-document:before{content:'\e052'}.oi-dollar:before{content:'\e053'}.oi-double-quote-sans-left:before{content:'\e054'}.oi-double-quote-sans-right:before{content:'\e055'}.oi-double-quote-serif-left:before{content:'\e056'}.oi-double-quote-serif-right:before{content:'\e057'}.oi-droplet:before{content:'\e058'}.oi-eject:before{content:'\e059'}.oi-elevator:before{content:'\e05a'}.oi-ellipses:before{content:'\e05b'}.oi-envelope-closed:before{content:'\e05c'}.oi-envelope-open:before{content:'\e05d'}.oi-euro:before{content:'\e05e'}.oi-excerpt:before{content:'\e05f'}.oi-expand-down:before{content:'\e060'}.oi-expand-left:before{content:'\e061'}.oi-expand-right:before{content:'\e062'}.oi-expand-up:before{content:'\e063'}.oi-external-link:before{content:'\e064'}.oi-eye:before{content:'\e065'}.oi-eyedropper:before{content:'\e066'}.oi-file:before{content:'\e067'}.oi-fire:before{content:'\e068'}.oi-flag:before{content:'\e069'}.oi-flash:before{content:'\e06a'}.oi-folder:before{content:'\e06b'}.oi-fork:before{content:'\e06c'}.oi-fullscreen-enter:before{content:'\e06d'}.oi-fullscreen-exit:before{content:'\e06e'}.oi-globe:before{content:'\e06f'}.oi-graph:before{content:'\e070'}.oi-grid-four-up:before{content:'\e071'}.oi-grid-three-up:before{content:'\e072'}.oi-grid-two-up:before{content:'\e073'}.oi-hard-drive:before{content:'\e074'}.oi-header:before{content:'\e075'}.oi-headphones:before{content:'\e076'}.oi-heart:before{content:'\e077'}.oi-home:before{content:'\e078'}.oi-image:before{content:'\e079'}.oi-inbox:before{content:'\e07a'}.oi-infinity:before{content:'\e07b'}.oi-info:before{content:'\e07c'}.oi-italic:before{content:'\e07d'}.oi-justify-center:before{content:'\e07e'}.oi-justify-left:before{content:'\e07f'}.oi-justify-right:before{content:'\e080'}.oi-key:before{content:'\e081'}.oi-laptop:before{content:'\e082'}.oi-layers:before{content:'\e083'}.oi-lightbulb:before{content:'\e084'}.oi-link-broken:before{content:'\e085'}.oi-link-intact:before{content:'\e086'}.oi-list-rich:before{content:'\e087'}.oi-list:before{content:'\e088'}.oi-location:before{content:'\e089'}.oi-lock-locked:before{content:'\e08a'}.oi-lock-unlocked:before{content:'\e08b'}.oi-loop-circular:before{content:'\e08c'}.oi-loop-square:before{content:'\e08d'}.oi-loop:before{content:'\e08e'}.oi-magnifying-glass:before{content:'\e08f'}.oi-map-marker:before{content:'\e090'}.oi-map:before{content:'\e091'}.oi-media-pause:before{content:'\e092'}.oi-media-play:before{content:'\e093'}.oi-media-record:before{content:'\e094'}.oi-media-skip-backward:before{content:'\e095'}.oi-media-skip-forward:before{content:'\e096'}.oi-media-step-backward:before{content:'\e097'}.oi-media-step-forward:before{content:'\e098'}.oi-media-stop:before{content:'\e099'}.oi-medical-cross:before{content:'\e09a'}.oi-menu:before{content:'\e09b'}.oi-microphone:before{content:'\e09c'}.oi-minus:before{content:'\e09d'}.oi-monitor:before{content:'\e09e'}.oi-moon:before{content:'\e09f'}.oi-move:before{content:'\e0a0'}.oi-musical-note:before{content:'\e0a1'}.oi-paperclip:before{content:'\e0a2'}.oi-pencil:before{content:'\e0a3'}.oi-people:before{content:'\e0a4'}.oi-person:before{content:'\e0a5'}.oi-phone:before{content:'\e0a6'}.oi-pie-chart:before{content:'\e0a7'}.oi-pin:before{content:'\e0a8'}.oi-play-circle:before{content:'\e0a9'}.oi-plus:before{content:'\e0aa'}.oi-power-standby:before{content:'\e0ab'}.oi-print:before{content:'\e0ac'}.oi-project:before{content:'\e0ad'}.oi-pulse:before{content:'\e0ae'}.oi-puzzle-piece:before{content:'\e0af'}.oi-question-mark:before{content:'\e0b0'}.oi-rain:before{content:'\e0b1'}.oi-random:before{content:'\e0b2'}.oi-reload:before{content:'\e0b3'}.oi-resize-both:before{content:'\e0b4'}.oi-resize-height:before{content:'\e0b5'}.oi-resize-width:before{content:'\e0b6'}.oi-rss-alt:before{content:'\e0b7'}.oi-rss:before{content:'\e0b8'}.oi-script:before{content:'\e0b9'}.oi-share-boxed:before{content:'\e0ba'}.oi-share:before{content:'\e0bb'}.oi-shield:before{content:'\e0bc'}.oi-signal:before{content:'\e0bd'}.oi-signpost:before{content:'\e0be'}.oi-sort-ascending:before{content:'\e0bf'}.oi-sort-descending:before{content:'\e0c0'}.oi-spreadsheet:before{content:'\e0c1'}.oi-star:before{content:'\e0c2'}.oi-sun:before{content:'\e0c3'}.oi-tablet:before{content:'\e0c4'}.oi-tag:before{content:'\e0c5'}.oi-tags:before{content:'\e0c6'}.oi-target:before{content:'\e0c7'}.oi-task:before{content:'\e0c8'}.oi-terminal:before{content:'\e0c9'}.oi-text:before{content:'\e0ca'}.oi-thumb-down:before{content:'\e0cb'}.oi-thumb-up:before{content:'\e0cc'}.oi-timer:before{content:'\e0cd'}.oi-transfer:before{content:'\e0ce'}.oi-trash:before{content:'\e0cf'}.oi-underline:before{content:'\e0d0'}.oi-vertical-align-bottom:before{content:'\e0d1'}.oi-vertical-align-center:before{content:'\e0d2'}.oi-vertical-align-top:before{content:'\e0d3'}.oi-video:before{content:'\e0d4'}.oi-volume-high:before{content:'\e0d5'}.oi-volume-low:before{content:'\e0d6'}.oi-volume-off:before{content:'\e0d7'}.oi-warning:before{content:'\e0d8'}.oi-wifi:before{content:'\e0d9'}.oi-wrench:before{content:'\e0da'}.oi-x:before{content:'\e0db'}.oi-yen:before{content:'\e0dc'}.oi-zoom-in:before{content:'\e0dd'}.oi-zoom-out:before{content:'\e0de'} -------------------------------------------------------------------------------- /demos/01-BlazorClient/BlazorSample.Client/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottdock/Talks.FullStackAspNetCore30/d5bdec29054fcc33cb05be6fb466cec9d0c87c2f/demos/01-BlazorClient/BlazorSample.Client/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /demos/01-BlazorClient/BlazorSample.Client/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottdock/Talks.FullStackAspNetCore30/d5bdec29054fcc33cb05be6fb466cec9d0c87c2f/demos/01-BlazorClient/BlazorSample.Client/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /demos/01-BlazorClient/BlazorSample.Client/wwwroot/css/open-iconic/font/fonts/open-iconic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | Created by FontForge 20120731 at Tue Jul 1 20:39:22 2014 9 | By P.J. Onori 10 | Created by P.J. Onori with FontForge 2.0 (http://fontforge.sf.net) 11 | 12 | 13 | 14 | 27 | 28 | 30 | 32 | 34 | 36 | 38 | 40 | 42 | 45 | 47 | 49 | 51 | 53 | 55 | 57 | 59 | 61 | 63 | 65 | 67 | 69 | 71 | 74 | 76 | 79 | 81 | 84 | 86 | 88 | 91 | 93 | 95 | 98 | 100 | 102 | 104 | 106 | 109 | 112 | 115 | 117 | 121 | 123 | 125 | 127 | 130 | 132 | 134 | 136 | 138 | 141 | 143 | 145 | 147 | 149 | 151 | 153 | 155 | 157 | 159 | 162 | 165 | 167 | 169 | 172 | 174 | 177 | 179 | 181 | 183 | 185 | 189 | 191 | 194 | 196 | 198 | 200 | 202 | 205 | 207 | 209 | 211 | 213 | 215 | 218 | 220 | 222 | 224 | 226 | 228 | 230 | 232 | 234 | 236 | 238 | 241 | 243 | 245 | 247 | 249 | 251 | 253 | 256 | 259 | 261 | 263 | 265 | 267 | 269 | 272 | 274 | 276 | 280 | 282 | 285 | 287 | 289 | 292 | 295 | 298 | 300 | 302 | 304 | 306 | 309 | 312 | 314 | 316 | 318 | 320 | 322 | 324 | 326 | 330 | 334 | 338 | 340 | 343 | 345 | 347 | 349 | 351 | 353 | 355 | 358 | 360 | 363 | 365 | 367 | 369 | 371 | 373 | 375 | 377 | 379 | 381 | 383 | 386 | 388 | 390 | 392 | 394 | 396 | 399 | 401 | 404 | 406 | 408 | 410 | 412 | 414 | 416 | 419 | 421 | 423 | 425 | 428 | 431 | 435 | 438 | 440 | 442 | 444 | 446 | 448 | 451 | 453 | 455 | 457 | 460 | 462 | 464 | 466 | 468 | 471 | 473 | 477 | 479 | 481 | 483 | 486 | 488 | 490 | 492 | 494 | 496 | 499 | 501 | 504 | 506 | 509 | 512 | 515 | 517 | 520 | 522 | 524 | 526 | 529 | 532 | 534 | 536 | 539 | 542 | 543 | 544 | -------------------------------------------------------------------------------- /demos/01-BlazorClient/BlazorSample.Client/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottdock/Talks.FullStackAspNetCore30/d5bdec29054fcc33cb05be6fb466cec9d0c87c2f/demos/01-BlazorClient/BlazorSample.Client/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /demos/01-BlazorClient/BlazorSample.Client/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottdock/Talks.FullStackAspNetCore30/d5bdec29054fcc33cb05be6fb466cec9d0c87c2f/demos/01-BlazorClient/BlazorSample.Client/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /demos/01-BlazorClient/BlazorSample.Client/wwwroot/css/site.css: -------------------------------------------------------------------------------- 1 | @import url('open-iconic/font/css/open-iconic-bootstrap.min.css'); 2 | 3 | html, body { 4 | font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; 5 | } 6 | 7 | app { 8 | position: relative; 9 | display: flex; 10 | flex-direction: column; 11 | } 12 | 13 | .top-row { 14 | height: 3.5rem; 15 | display: flex; 16 | align-items: center; 17 | } 18 | 19 | .main { 20 | flex: 1; 21 | } 22 | 23 | .main .top-row { 24 | background-color: #e6e6e6; 25 | border-bottom: 1px solid #d6d5d5; 26 | } 27 | 28 | .sidebar { 29 | background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%); 30 | } 31 | 32 | .sidebar .top-row { 33 | background-color: rgba(0,0,0,0.4); 34 | } 35 | 36 | .sidebar .navbar-brand { 37 | font-size: 1.1rem; 38 | } 39 | 40 | .sidebar .oi { 41 | width: 2rem; 42 | font-size: 1.1rem; 43 | vertical-align: text-top; 44 | top: -2px; 45 | } 46 | 47 | .nav-item { 48 | font-size: 0.9rem; 49 | padding-bottom: 0.5rem; 50 | } 51 | 52 | .nav-item:first-of-type { 53 | padding-top: 1rem; 54 | } 55 | 56 | .nav-item:last-of-type { 57 | padding-bottom: 1rem; 58 | } 59 | 60 | .nav-item a { 61 | color: #d7d7d7; 62 | border-radius: 4px; 63 | height: 3rem; 64 | display: flex; 65 | align-items: center; 66 | line-height: 3rem; 67 | } 68 | 69 | .nav-item a.active { 70 | background-color: rgba(255,255,255,0.25); 71 | color: white; 72 | } 73 | 74 | .nav-item a:hover { 75 | background-color: rgba(255,255,255,0.1); 76 | color: white; 77 | } 78 | 79 | .content { 80 | padding-top: 1.1rem; 81 | } 82 | 83 | .navbar-toggler { 84 | background-color: rgba(255, 255, 255, 0.1); 85 | } 86 | 87 | .valid.modified:not([type=checkbox]) { 88 | outline: 1px solid #26b050; 89 | } 90 | 91 | .invalid { 92 | outline: 1px solid red; 93 | } 94 | 95 | .validation-message { 96 | color: red; 97 | } 98 | 99 | @media (max-width: 767.98px) { 100 | .main .top-row { 101 | display: none; 102 | } 103 | } 104 | 105 | @media (min-width: 768px) { 106 | app { 107 | flex-direction: row; 108 | } 109 | 110 | .sidebar { 111 | width: 250px; 112 | height: 100vh; 113 | position: sticky; 114 | top: 0; 115 | } 116 | 117 | .main .top-row { 118 | position: sticky; 119 | top: 0; 120 | } 121 | 122 | .main > div { 123 | padding-left: 2rem !important; 124 | padding-right: 1.5rem !important; 125 | } 126 | 127 | .navbar-toggler { 128 | display: none; 129 | } 130 | 131 | .sidebar .collapse { 132 | /* Never collapse the sidebar for wide screens */ 133 | display: block; 134 | } 135 | } 136 | -------------------------------------------------------------------------------- /demos/01-BlazorClient/BlazorSample.Client/wwwroot/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | BlazorSample 7 | 8 | 9 | 10 | 11 | 12 | Loading... 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /demos/01-BlazorClient/BlazorSample.Server/BlazorSample.Server.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netcoreapp3.0 5 | 6 | https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json; 7 | https://dotnet.myget.org/F/blazor-dev/api/v3/index.json; 8 | 9 | 7.3 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /demos/01-BlazorClient/BlazorSample.Server/Controllers/SampleDataController.cs: -------------------------------------------------------------------------------- 1 | using BlazorSample.Shared; 2 | using Microsoft.AspNetCore.Mvc; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | 8 | namespace BlazorSample.Server.Controllers 9 | { 10 | [Route("api/[controller]")] 11 | public class SampleDataController : Controller 12 | { 13 | private static string[] Summaries = new[] 14 | { 15 | "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" 16 | }; 17 | 18 | [HttpGet("[action]")] 19 | public IEnumerable WeatherForecasts() 20 | { 21 | var rng = new Random(); 22 | return Enumerable.Range(1, 5).Select(index => new WeatherForecast 23 | { 24 | Date = DateTime.Now.AddDays(index), 25 | TemperatureC = rng.Next(-20, 55), 26 | Summary = Summaries[rng.Next(Summaries.Length)] 27 | }); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /demos/01-BlazorClient/BlazorSample.Server/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore; 2 | using Microsoft.AspNetCore.Hosting; 3 | using Microsoft.Extensions.Configuration; 4 | 5 | namespace BlazorSample.Server 6 | { 7 | public class Program 8 | { 9 | public static void Main(string[] args) 10 | { 11 | BuildWebHost(args).Run(); 12 | } 13 | 14 | public static IWebHost BuildWebHost(string[] args) => 15 | WebHost.CreateDefaultBuilder(args) 16 | .UseConfiguration(new ConfigurationBuilder() 17 | .AddCommandLine(args) 18 | .Build()) 19 | .UseStartup() 20 | .Build(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /demos/01-BlazorClient/BlazorSample.Server/Startup.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Builder; 2 | using Microsoft.AspNetCore.Hosting; 3 | using Microsoft.AspNetCore.ResponseCompression; 4 | using Microsoft.Extensions.DependencyInjection; 5 | using Microsoft.Extensions.Hosting; 6 | using Newtonsoft.Json.Serialization; 7 | using System.Linq; 8 | 9 | namespace BlazorSample.Server 10 | { 11 | public class Startup 12 | { 13 | // This method gets called by the runtime. Use this method to add services to the container. 14 | // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 15 | public void ConfigureServices(IServiceCollection services) 16 | { 17 | services.AddMvc().AddNewtonsoftJson(); 18 | services.AddResponseCompression(opts => 19 | { 20 | opts.MimeTypes = ResponseCompressionDefaults.MimeTypes.Concat( 21 | new[] { "application/octet-stream" }); 22 | }); 23 | } 24 | 25 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. 26 | public void Configure(IApplicationBuilder app, IWebHostEnvironment env) 27 | { 28 | app.UseClientSideBlazorFiles(); 29 | app.UseResponseCompression(); 30 | 31 | if (env.IsDevelopment()) 32 | { 33 | app.UseDeveloperExceptionPage(); 34 | app.UseBlazorDebugging(); 35 | } 36 | 37 | app.UseRouting(); 38 | 39 | app.UseEndpoints(endpoints => 40 | { 41 | endpoints.MapDefaultControllerRoute(); 42 | endpoints.MapFallbackToClientSideBlazor("index.html"); 43 | }); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /demos/01-BlazorClient/BlazorSample.Shared/BlazorSample.Shared.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 7.3 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /demos/01-BlazorClient/BlazorSample.Shared/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace BlazorSample.Shared 6 | { 7 | public class WeatherForecast 8 | { 9 | public DateTime Date { get; set; } 10 | 11 | public int TemperatureC { get; set; } 12 | 13 | public string Summary { get; set; } 14 | 15 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /demos/01-BlazorClient/BlazorSample.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.28902.138 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorSample.Server", "BlazorSample.Server\BlazorSample.Server.csproj", "{2A7ADE86-30D2-434A-9DE7-FD0005BF0804}" 7 | EndProject 8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorSample.Client", "BlazorSample.Client\BlazorSample.Client.csproj", "{C83C3D00-C2CF-4C29-BBFC-AE068F1AB189}" 9 | EndProject 10 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorSample.Shared", "BlazorSample.Shared\BlazorSample.Shared.csproj", "{D586CEA9-D5C8-4E83-A055-56A4AD0B4B5A}" 11 | EndProject 12 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorGridComponent", "BlazorGridComponent\BlazorGridComponent.csproj", "{1CC4B0C3-1C17-4408-B93F-D151123783EF}" 13 | EndProject 14 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution Files", "{4B338735-B7CC-463A-9144-356B8B9EBB65}" 15 | ProjectSection(SolutionItems) = preProject 16 | global.json = global.json 17 | EndProjectSection 18 | EndProject 19 | Global 20 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 21 | Debug|Any CPU = Debug|Any CPU 22 | Release|Any CPU = Release|Any CPU 23 | EndGlobalSection 24 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 25 | {2A7ADE86-30D2-434A-9DE7-FD0005BF0804}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 26 | {2A7ADE86-30D2-434A-9DE7-FD0005BF0804}.Debug|Any CPU.Build.0 = Debug|Any CPU 27 | {2A7ADE86-30D2-434A-9DE7-FD0005BF0804}.Release|Any CPU.ActiveCfg = Release|Any CPU 28 | {2A7ADE86-30D2-434A-9DE7-FD0005BF0804}.Release|Any CPU.Build.0 = Release|Any CPU 29 | {C83C3D00-C2CF-4C29-BBFC-AE068F1AB189}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 30 | {C83C3D00-C2CF-4C29-BBFC-AE068F1AB189}.Debug|Any CPU.Build.0 = Debug|Any CPU 31 | {C83C3D00-C2CF-4C29-BBFC-AE068F1AB189}.Release|Any CPU.ActiveCfg = Release|Any CPU 32 | {C83C3D00-C2CF-4C29-BBFC-AE068F1AB189}.Release|Any CPU.Build.0 = Release|Any CPU 33 | {D586CEA9-D5C8-4E83-A055-56A4AD0B4B5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 34 | {D586CEA9-D5C8-4E83-A055-56A4AD0B4B5A}.Debug|Any CPU.Build.0 = Debug|Any CPU 35 | {D586CEA9-D5C8-4E83-A055-56A4AD0B4B5A}.Release|Any CPU.ActiveCfg = Release|Any CPU 36 | {D586CEA9-D5C8-4E83-A055-56A4AD0B4B5A}.Release|Any CPU.Build.0 = Release|Any CPU 37 | {1CC4B0C3-1C17-4408-B93F-D151123783EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 38 | {1CC4B0C3-1C17-4408-B93F-D151123783EF}.Debug|Any CPU.Build.0 = Debug|Any CPU 39 | {1CC4B0C3-1C17-4408-B93F-D151123783EF}.Release|Any CPU.ActiveCfg = Release|Any CPU 40 | {1CC4B0C3-1C17-4408-B93F-D151123783EF}.Release|Any CPU.Build.0 = Release|Any CPU 41 | EndGlobalSection 42 | GlobalSection(SolutionProperties) = preSolution 43 | HideSolutionNode = FALSE 44 | EndGlobalSection 45 | GlobalSection(ExtensibilityGlobals) = postSolution 46 | SolutionGuid = {21081A8F-7E54-4128-9759-EF6C79573B84} 47 | EndGlobalSection 48 | EndGlobal 49 | -------------------------------------------------------------------------------- /demos/01-BlazorClient/global.json: -------------------------------------------------------------------------------- 1 | { 2 | "sdk": { 3 | "version": "3.0.100-preview5-011568" 4 | } 5 | } -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.Api/BlazorInsider.Api.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netcoreapp3.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.Api/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Net; 6 | using System.Threading.Tasks; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.AspNetCore.Server.Kestrel.Core; 9 | using Microsoft.Extensions.Hosting; 10 | 11 | namespace BlazorInsider.Api 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | CreateHostBuilder(args).Build().Run(); 18 | } 19 | 20 | public static IHostBuilder CreateHostBuilder(string[] args) => 21 | Host.CreateDefaultBuilder(args) 22 | .ConfigureWebHostDefaults(webBuilder => 23 | { 24 | webBuilder 25 | .ConfigureKestrel(options => 26 | { 27 | options.Listen(IPAddress.Any, 8194, listenOptions => 28 | { 29 | listenOptions.Protocols = HttpProtocols.Http2; 30 | }); 31 | }) 32 | .UseStartup(); 33 | }); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.Api/Protos/ordershandler.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | option csharp_namespace = "BlazorInsider.Api"; 4 | 5 | package OrdersHandler; 6 | 7 | // The orders service definition. 8 | service OrdersManager { 9 | // Gets an order from the database 10 | rpc GetNewOrder (OrderRequest) returns (OrderReply) {} 11 | rpc AddOrder (AddOrderRequest) returns (AddOrderResponse) {} 12 | rpc GetOrders (GetOrdersRequest) returns (GetOrdersResponse) {} 13 | rpc UpdateOrder (UpdateOrderRequest) returns (UpdateOrderResponse) {} 14 | } 15 | 16 | // ------------ GLOBAL OBJECT 17 | message GetOrderModel { 18 | int32 orderID = 1; 19 | string description = 2; 20 | int32 quantity = 3; 21 | double total = 4; 22 | string status = 5; 23 | } 24 | 25 | // ------------ GetNewOrder endpoint 26 | // The order request 27 | message OrderRequest { 28 | } 29 | 30 | // The id of the order which must be processed 31 | message OrderReply { 32 | int32 orderId = 1; 33 | } 34 | 35 | // ------------ AddOrder endpoint 36 | message AddOrderRequest { 37 | int32 orderID = 1; 38 | string description = 2; 39 | int32 quantity = 3; 40 | double total = 4; 41 | string status = 5; 42 | } 43 | 44 | message AddOrderResponse { 45 | int32 newOrderID = 1; 46 | } 47 | 48 | // ------------ GetOrders endpoint 49 | message GetOrdersRequest { 50 | } 51 | 52 | message GetOrdersResponse { 53 | repeated GetOrderModel getOrderModels = 1; 54 | } 55 | 56 | // ------------ UpdateOrder endpoint 57 | message UpdateOrderRequest { 58 | int32 orderID = 1; 59 | } 60 | 61 | message UpdateOrderResponse { 62 | bool success = 1; 63 | string errorMessage = 2; 64 | } 65 | 66 | -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.Api/Services/OrdersManagerService.cs: -------------------------------------------------------------------------------- 1 | using Grpc.Core; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace BlazorInsider.Api.Services 8 | { 9 | public class OrdersManagerService : OrdersManager.OrdersManagerBase 10 | { 11 | public override Task AddOrder(AddOrderRequest request, ServerCallContext context) 12 | { 13 | // create model 14 | var order = new BlazorInsider.Shared.Model.Order 15 | { 16 | OrderId = request.OrderID, 17 | Description = request.Description, 18 | Quantity = request.Quantity, 19 | Total = request.Total, 20 | Status = "Pending" 21 | }; 22 | 23 | // now save order 24 | var dbService = new BlazorInsider.App.Services.DatabaseService(); 25 | dbService.AddOrder(order); 26 | 27 | var result = new AddOrderResponse() { NewOrderID = order.OrderId }; 28 | 29 | return Task.FromResult(result); 30 | } 31 | 32 | public override Task GetNewOrder(OrderRequest request, ServerCallContext context) 33 | { 34 | var service = new BlazorInsider.App.Services.DatabaseService(); 35 | var order = service.GetPendingOrder(); 36 | 37 | int orderId = order == null ? 0 : order.OrderId; 38 | 39 | var reply = new OrderReply 40 | { 41 | OrderId = orderId 42 | }; 43 | 44 | return Task.FromResult(reply); 45 | } 46 | 47 | public override Task GetOrders(GetOrdersRequest request, ServerCallContext context) 48 | { 49 | var service = new BlazorInsider.App.Services.DatabaseService(); 50 | var orders = service.GetOrders(); 51 | 52 | var result = new GetOrdersResponse(); 53 | 54 | foreach (var item in orders) 55 | { 56 | var order = new GetOrderModel() 57 | { 58 | OrderID = item.OrderId, 59 | Description = item.Description, 60 | Quantity = item.Quantity, 61 | Status = item.Status, 62 | Total = item.Total 63 | }; 64 | result.GetOrderModels.Add(order); 65 | } 66 | 67 | return Task.FromResult(result); 68 | } 69 | 70 | public override Task UpdateOrder(UpdateOrderRequest request, ServerCallContext context) 71 | { 72 | // init UpdateOrder 73 | var result = new UpdateOrderResponse() 74 | { 75 | Success = false, 76 | ErrorMessage = string.Empty 77 | }; 78 | 79 | // now update order 80 | try 81 | { 82 | var dbService = new BlazorInsider.App.Services.DatabaseService(); 83 | dbService.UpdateOrder(request.OrderID); 84 | result.Success = true; 85 | } 86 | catch (Exception ex) 87 | { 88 | var msg = (ex.InnerException != null) 89 | ? $"{ex.Message} {ex.InnerException.Message} {ex.StackTrace}" 90 | : $"{ex.Message} {ex.StackTrace}"; 91 | 92 | result.Success = false; 93 | result.ErrorMessage = msg; 94 | } 95 | 96 | return Task.FromResult(result); 97 | } 98 | 99 | 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.Api/Startup.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Builder; 6 | using Microsoft.AspNetCore.Hosting; 7 | using Microsoft.Extensions.DependencyInjection; 8 | using Microsoft.Extensions.Hosting; 9 | using BlazorInsider.Api.Services; 10 | 11 | namespace BlazorInsider.Api 12 | { 13 | public class Startup 14 | { 15 | // This method gets called by the runtime. Use this method to add services to the container. 16 | // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 17 | public void ConfigureServices(IServiceCollection services) 18 | { 19 | services.AddGrpc(); 20 | } 21 | 22 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. 23 | public void Configure(IApplicationBuilder app, IWebHostEnvironment env) 24 | { 25 | if (env.IsDevelopment()) 26 | { 27 | app.UseDeveloperExceptionPage(); 28 | } 29 | 30 | app.UseRouting(); 31 | 32 | app.UseEndpoints(endpoints => 33 | { 34 | // Communication with gRPC endpoints must be made through a gRPC client. 35 | // To learn how to create a client, visit: https://go.microsoft.com/fwlink/?linkid=2086909 36 | endpoints.MapGrpcService(); 37 | }); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.Api/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Grpc": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.Api/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Warning", 5 | "Microsoft.Hosting.Lifetime": "Information" 6 | } 7 | }, 8 | "AllowedHosts": "*", 9 | "Kestrel": { 10 | "EndpointDefaults": { 11 | "Protocols": "Http2" 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.App/App.razor: -------------------------------------------------------------------------------- 1 | @* 2 | The Router component displays whichever component has a @page 3 | directive matching the current URI. 4 | *@ 5 | 6 | -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.App/BlazorInsider.App.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netcoreapp3.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.App/Pages/About.razor: -------------------------------------------------------------------------------- 1 | @page "/about" 2 | 3 |

Insider Dev Tour 2019

4 |

Get all the latest news about ASP.NET Core 3.0!

-------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.App/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | @using BlazorInsider.App.Services 3 | @using BlazorInsider.Shared.Model 4 | @using Grpc.Net.Client; 5 | @using Grpc.Core; 6 | 7 |

Add new order

8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
Description:
Quantity:
Total:
23 | 24 |

25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 | 33 |

34 |

Orders

35 |

36 | 37 | @if (orders == null) 38 | { 39 |

Loading...

40 | } 41 | else 42 | { 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | @foreach (var order in orders) 55 | { 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | } 64 | 65 |
Order idDescriptionQuantityTotalStatus
@order.OrderId@order.Description@order.Quantity@order.Total@order.Status
66 | } 67 | 68 | @code 69 | { 70 | int orderId; 71 | string description; 72 | int quantity; 73 | double total; 74 | List orders; 75 | 76 | async Task SaveOrder() 77 | { 78 | AppContext.SetSwitch( 79 | "System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", 80 | true); 81 | 82 | var channel = new Channel("127.0.0.1:8194", ChannelCredentials.Insecure); 83 | var client = new OrdersManager.OrdersManagerClient(channel); 84 | var request = new AddOrderRequest() 85 | { 86 | Description = description, 87 | OrderID = orderId, 88 | Quantity = quantity, 89 | Total = total, 90 | Status = "Pending" 91 | }; 92 | 93 | var reply = await client.AddOrderAsync(request); 94 | 95 | await channel.ShutdownAsync(); 96 | 97 | RefreshOrders(); 98 | 99 | // init Input fields 100 | description = string.Empty; 101 | quantity = 0; 102 | total = 0; 103 | } 104 | 105 | void RefreshOrders() 106 | { 107 | AppContext.SetSwitch( 108 | "System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", 109 | true); 110 | 111 | var channel = new Channel("127.0.0.1:8194", ChannelCredentials.Insecure); 112 | var client = new OrdersManager.OrdersManagerClient(channel); 113 | var request = new GetOrdersRequest(); 114 | var reply = client.GetOrders(request); 115 | 116 | // map objects to result 117 | var ordersToDisplay = new List(); 118 | foreach (var item in reply.GetOrderModels) 119 | { 120 | var orderModel = new Order() 121 | { 122 | OrderId = item.OrderID, 123 | Description = item.Description, 124 | Quantity = item.Quantity, 125 | Status = item.Status, 126 | Total = item.Total 127 | }; 128 | ordersToDisplay.Add(orderModel); 129 | } 130 | 131 | orders = ordersToDisplay; 132 | } 133 | 134 | protected override void OnInit() 135 | { 136 | RefreshOrders(); 137 | } 138 | } -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.App/Pages/_Host.cshtml: -------------------------------------------------------------------------------- 1 | @page "/" 2 | @namespace BlazorInsider.App.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | 5 | 6 | 7 | 8 | 9 | 10 | BlazorInsider.App 11 | 12 | 13 | 14 | 15 | 16 | 21 | 22 | 23 | 24 | 25 | @(await Html.RenderComponentAsync()) 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.App/Pages/_Imports.razor: -------------------------------------------------------------------------------- 1 | @layout MainLayout 2 | -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.App/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Net; 6 | using System.Threading.Tasks; 7 | using Microsoft.AspNetCore; 8 | using Microsoft.AspNetCore.Hosting; 9 | using Microsoft.AspNetCore.Server.Kestrel.Core; 10 | using Microsoft.Extensions.Configuration; 11 | using Microsoft.Extensions.Hosting; 12 | using Microsoft.Extensions.Logging; 13 | 14 | namespace BlazorInsider.App 15 | { 16 | public class Program 17 | { 18 | public static void Main(string[] args) 19 | { 20 | CreateHostBuilder(args).Build().Run(); 21 | } 22 | 23 | public static IHostBuilder CreateHostBuilder(string[] args) => 24 | Host.CreateDefaultBuilder(args) 25 | .ConfigureWebHostDefaults(webBuilder => 26 | { 27 | webBuilder.UseStartup(); 28 | }); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.App/Protos/ordershandler.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | option csharp_namespace = "BlazorInsider.App"; 4 | 5 | package OrdersHandler; 6 | 7 | // The orders service definition. 8 | service OrdersManager { 9 | // Gets an order from the database 10 | rpc GetNewOrder (OrderRequest) returns (OrderReply) {} 11 | rpc AddOrder (AddOrderRequest) returns (AddOrderResponse) {} 12 | rpc GetOrders (GetOrdersRequest) returns (GetOrdersResponse) {} 13 | } 14 | 15 | // ------------ GLOBAL OBJECT 16 | message GetOrderModel { 17 | int32 orderID = 1; 18 | string description = 2; 19 | int32 quantity = 3; 20 | double total = 4; 21 | string status = 5; 22 | } 23 | 24 | // ------------ GetNewOrder endpoint 25 | // The order request 26 | message OrderRequest { 27 | } 28 | 29 | // The id of the order which must be processed 30 | message OrderReply { 31 | int32 orderId = 1; 32 | } 33 | 34 | // ------------ AddOrder endpoint 35 | message AddOrderRequest { 36 | int32 orderID = 1; 37 | string description = 2; 38 | int32 quantity = 3; 39 | double total = 4; 40 | string status = 5; 41 | } 42 | 43 | message AddOrderResponse { 44 | int32 newOrderID = 1; 45 | } 46 | 47 | // ------------ GetOrders endpoint 48 | message GetOrdersRequest { 49 | } 50 | 51 | message GetOrdersResponse { 52 | repeated GetOrderModel getOrderModels = 1; 53 | } -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.App/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | 6 | 7 |
8 |
9 | About 10 |
11 | 12 |
13 | @Body 14 |
15 |
16 | -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.App/Shared/NavMenu.razor: -------------------------------------------------------------------------------- 1 | 7 | 8 |
9 | 21 |
22 | 23 | @functions { 24 | bool collapseNavMenu = true; 25 | 26 | string NavMenuCssClass => collapseNavMenu ? "collapse" : null; 27 | 28 | void ToggleNavMenu() 29 | { 30 | collapseNavMenu = !collapseNavMenu; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.App/Startup.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Builder; 6 | using Microsoft.AspNetCore.Hosting; 7 | using Microsoft.AspNetCore.Http; 8 | using Microsoft.AspNetCore.HttpsPolicy; 9 | using Microsoft.Extensions.DependencyInjection; 10 | using Microsoft.Extensions.Hosting; 11 | using BlazorInsider.App.Services; 12 | 13 | namespace BlazorInsider.App 14 | { 15 | public class Startup 16 | { 17 | // This method gets called by the runtime. Use this method to add services to the container. 18 | // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 19 | public void ConfigureServices(IServiceCollection services) 20 | { 21 | services.AddGrpc(); 22 | services.AddRazorPages(); 23 | services.AddServerSideBlazor(); 24 | } 25 | 26 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. 27 | public void Configure(IApplicationBuilder app, IWebHostEnvironment env) 28 | { 29 | if (env.IsDevelopment()) 30 | { 31 | app.UseDeveloperExceptionPage(); 32 | } 33 | else 34 | { 35 | // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. 36 | app.UseHsts(); 37 | } 38 | 39 | app.UseStaticFiles(); 40 | 41 | app.UseRouting(); 42 | 43 | app.UseEndpoints(endpoints => 44 | { 45 | endpoints.MapBlazorHub(); 46 | endpoints.MapFallbackToPage("/_Host"); 47 | }); 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.App/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using Microsoft.AspNetCore.Components.Forms 3 | @using Microsoft.AspNetCore.Components.Layouts 4 | @using Microsoft.AspNetCore.Components.Routing 5 | @using Microsoft.JSInterop 6 | @using BlazorInsider.App.Shared 7 | -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.App/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.App/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.App/wwwroot/css/open-iconic/FONT-LICENSE: -------------------------------------------------------------------------------- 1 | SIL OPEN FONT LICENSE Version 1.1 2 | 3 | Copyright (c) 2014 Waybury 4 | 5 | PREAMBLE 6 | The goals of the Open Font License (OFL) are to stimulate worldwide 7 | development of collaborative font projects, to support the font creation 8 | efforts of academic and linguistic communities, and to provide a free and 9 | open framework in which fonts may be shared and improved in partnership 10 | with others. 11 | 12 | The OFL allows the licensed fonts to be used, studied, modified and 13 | redistributed freely as long as they are not sold by themselves. The 14 | fonts, including any derivative works, can be bundled, embedded, 15 | redistributed and/or sold with any software provided that any reserved 16 | names are not used by derivative works. The fonts and derivatives, 17 | however, cannot be released under any other type of license. The 18 | requirement for fonts to remain under this license does not apply 19 | to any document created using the fonts or their derivatives. 20 | 21 | DEFINITIONS 22 | "Font Software" refers to the set of files released by the Copyright 23 | Holder(s) under this license and clearly marked as such. This may 24 | include source files, build scripts and documentation. 25 | 26 | "Reserved Font Name" refers to any names specified as such after the 27 | copyright statement(s). 28 | 29 | "Original Version" refers to the collection of Font Software components as 30 | distributed by the Copyright Holder(s). 31 | 32 | "Modified Version" refers to any derivative made by adding to, deleting, 33 | or substituting -- in part or in whole -- any of the components of the 34 | Original Version, by changing formats or by porting the Font Software to a 35 | new environment. 36 | 37 | "Author" refers to any designer, engineer, programmer, technical 38 | writer or other person who contributed to the Font Software. 39 | 40 | PERMISSION & CONDITIONS 41 | Permission is hereby granted, free of charge, to any person obtaining 42 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 43 | redistribute, and sell modified and unmodified copies of the Font 44 | Software, subject to the following conditions: 45 | 46 | 1) Neither the Font Software nor any of its individual components, 47 | in Original or Modified Versions, may be sold by itself. 48 | 49 | 2) Original or Modified Versions of the Font Software may be bundled, 50 | redistributed and/or sold with any software, provided that each copy 51 | contains the above copyright notice and this license. These can be 52 | included either as stand-alone text files, human-readable headers or 53 | in the appropriate machine-readable metadata fields within text or 54 | binary files as long as those fields can be easily viewed by the user. 55 | 56 | 3) No Modified Version of the Font Software may use the Reserved Font 57 | Name(s) unless explicit written permission is granted by the corresponding 58 | Copyright Holder. This restriction only applies to the primary font name as 59 | presented to the users. 60 | 61 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 62 | Software shall not be used to promote, endorse or advertise any 63 | Modified Version, except to acknowledge the contribution(s) of the 64 | Copyright Holder(s) and the Author(s) or with their explicit written 65 | permission. 66 | 67 | 5) The Font Software, modified or unmodified, in part or in whole, 68 | must be distributed entirely under this license, and must not be 69 | distributed under any other license. The requirement for fonts to 70 | remain under this license does not apply to any document created 71 | using the Font Software. 72 | 73 | TERMINATION 74 | This license becomes null and void if any of the above conditions are 75 | not met. 76 | 77 | DISCLAIMER 78 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 79 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 80 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 81 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 82 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 83 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 84 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 85 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 86 | OTHER DEALINGS IN THE FONT SOFTWARE. 87 | -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.App/wwwroot/css/open-iconic/ICON-LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Waybury 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.App/wwwroot/css/open-iconic/README.md: -------------------------------------------------------------------------------- 1 | [Open Iconic v1.1.1](http://useiconic.com/open) 2 | =========== 3 | 4 | ### Open Iconic is the open source sibling of [Iconic](http://useiconic.com). It is a hyper-legible collection of 223 icons with a tiny footprint—ready to use with Bootstrap and Foundation. [View the collection](http://useiconic.com/open#icons) 5 | 6 | 7 | 8 | ## What's in Open Iconic? 9 | 10 | * 223 icons designed to be legible down to 8 pixels 11 | * Super-light SVG files - 61.8 for the entire set 12 | * SVG sprite—the modern replacement for icon fonts 13 | * Webfont (EOT, OTF, SVG, TTF, WOFF), PNG and WebP formats 14 | * Webfont stylesheets (including versions for Bootstrap and Foundation) in CSS, LESS, SCSS and Stylus formats 15 | * PNG and WebP raster images in 8px, 16px, 24px, 32px, 48px and 64px. 16 | 17 | 18 | ## Getting Started 19 | 20 | #### For code samples and everything else you need to get started with Open Iconic, check out our [Icons](http://useiconic.com/open#icons) and [Reference](http://useiconic.com/open#reference) sections. 21 | 22 | ### General Usage 23 | 24 | #### Using Open Iconic's SVGs 25 | 26 | We like SVGs and we think they're the way to display icons on the web. Since Open Iconic are just basic SVGs, we suggest you display them like you would any other image (don't forget the `alt` attribute). 27 | 28 | ``` 29 | icon name 30 | ``` 31 | 32 | #### Using Open Iconic's SVG Sprite 33 | 34 | Open Iconic also comes in a SVG sprite which allows you to display all the icons in the set with a single request. It's like an icon font, without being a hack. 35 | 36 | Adding an icon from an SVG sprite is a little different than what you're used to, but it's still a piece of cake. *Tip: To make your icons easily style able, we suggest adding a general class to the* `` *tag and a unique class name for each different icon in the* `` *tag.* 37 | 38 | ``` 39 | 40 | 41 | 42 | ``` 43 | 44 | Sizing icons only needs basic CSS. All the icons are in a square format, so just set the `` tag with equal width and height dimensions. 45 | 46 | ``` 47 | .icon { 48 | width: 16px; 49 | height: 16px; 50 | } 51 | ``` 52 | 53 | Coloring icons is even easier. All you need to do is set the `fill` rule on the `` tag. 54 | 55 | ``` 56 | .icon-account-login { 57 | fill: #f00; 58 | } 59 | ``` 60 | 61 | To learn more about SVG Sprites, read [Chris Coyier's guide](http://css-tricks.com/svg-sprites-use-better-icon-fonts/). 62 | 63 | #### Using Open Iconic's Icon Font... 64 | 65 | 66 | ##### …with Bootstrap 67 | 68 | You can find our Bootstrap stylesheets in `font/css/open-iconic-bootstrap.{css, less, scss, styl}` 69 | 70 | 71 | ``` 72 | 73 | ``` 74 | 75 | 76 | ``` 77 | 78 | ``` 79 | 80 | ##### …with Foundation 81 | 82 | You can find our Foundation stylesheets in `font/css/open-iconic-foundation.{css, less, scss, styl}` 83 | 84 | ``` 85 | 86 | ``` 87 | 88 | 89 | ``` 90 | 91 | ``` 92 | 93 | ##### …on its own 94 | 95 | You can find our default stylesheets in `font/css/open-iconic.{css, less, scss, styl}` 96 | 97 | ``` 98 | 99 | ``` 100 | 101 | ``` 102 | 103 | ``` 104 | 105 | 106 | ## License 107 | 108 | ### Icons 109 | 110 | All code (including SVG markup) is under the [MIT License](http://opensource.org/licenses/MIT). 111 | 112 | ### Fonts 113 | 114 | All fonts are under the [SIL Licensed](http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web). 115 | -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.App/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css: -------------------------------------------------------------------------------- 1 | @font-face{font-family:Icons;src:url(../fonts/open-iconic.eot);src:url(../fonts/open-iconic.eot?#iconic-sm) format('embedded-opentype'),url(../fonts/open-iconic.woff) format('woff'),url(../fonts/open-iconic.ttf) format('truetype'),url(../fonts/open-iconic.otf) format('opentype'),url(../fonts/open-iconic.svg#iconic-sm) format('svg');font-weight:400;font-style:normal}.oi{position:relative;top:1px;display:inline-block;speak:none;font-family:Icons;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.oi:empty:before{width:1em;text-align:center;box-sizing:content-box}.oi.oi-align-center:before{text-align:center}.oi.oi-align-left:before{text-align:left}.oi.oi-align-right:before{text-align:right}.oi.oi-flip-horizontal:before{-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.oi.oi-flip-vertical:before{-webkit-transform:scale(1,-1);-ms-transform:scale(-1,1);transform:scale(1,-1)}.oi.oi-flip-horizontal-vertical:before{-webkit-transform:scale(-1,-1);-ms-transform:scale(-1,1);transform:scale(-1,-1)}.oi-account-login:before{content:'\e000'}.oi-account-logout:before{content:'\e001'}.oi-action-redo:before{content:'\e002'}.oi-action-undo:before{content:'\e003'}.oi-align-center:before{content:'\e004'}.oi-align-left:before{content:'\e005'}.oi-align-right:before{content:'\e006'}.oi-aperture:before{content:'\e007'}.oi-arrow-bottom:before{content:'\e008'}.oi-arrow-circle-bottom:before{content:'\e009'}.oi-arrow-circle-left:before{content:'\e00a'}.oi-arrow-circle-right:before{content:'\e00b'}.oi-arrow-circle-top:before{content:'\e00c'}.oi-arrow-left:before{content:'\e00d'}.oi-arrow-right:before{content:'\e00e'}.oi-arrow-thick-bottom:before{content:'\e00f'}.oi-arrow-thick-left:before{content:'\e010'}.oi-arrow-thick-right:before{content:'\e011'}.oi-arrow-thick-top:before{content:'\e012'}.oi-arrow-top:before{content:'\e013'}.oi-audio-spectrum:before{content:'\e014'}.oi-audio:before{content:'\e015'}.oi-badge:before{content:'\e016'}.oi-ban:before{content:'\e017'}.oi-bar-chart:before{content:'\e018'}.oi-basket:before{content:'\e019'}.oi-battery-empty:before{content:'\e01a'}.oi-battery-full:before{content:'\e01b'}.oi-beaker:before{content:'\e01c'}.oi-bell:before{content:'\e01d'}.oi-bluetooth:before{content:'\e01e'}.oi-bold:before{content:'\e01f'}.oi-bolt:before{content:'\e020'}.oi-book:before{content:'\e021'}.oi-bookmark:before{content:'\e022'}.oi-box:before{content:'\e023'}.oi-briefcase:before{content:'\e024'}.oi-british-pound:before{content:'\e025'}.oi-browser:before{content:'\e026'}.oi-brush:before{content:'\e027'}.oi-bug:before{content:'\e028'}.oi-bullhorn:before{content:'\e029'}.oi-calculator:before{content:'\e02a'}.oi-calendar:before{content:'\e02b'}.oi-camera-slr:before{content:'\e02c'}.oi-caret-bottom:before{content:'\e02d'}.oi-caret-left:before{content:'\e02e'}.oi-caret-right:before{content:'\e02f'}.oi-caret-top:before{content:'\e030'}.oi-cart:before{content:'\e031'}.oi-chat:before{content:'\e032'}.oi-check:before{content:'\e033'}.oi-chevron-bottom:before{content:'\e034'}.oi-chevron-left:before{content:'\e035'}.oi-chevron-right:before{content:'\e036'}.oi-chevron-top:before{content:'\e037'}.oi-circle-check:before{content:'\e038'}.oi-circle-x:before{content:'\e039'}.oi-clipboard:before{content:'\e03a'}.oi-clock:before{content:'\e03b'}.oi-cloud-download:before{content:'\e03c'}.oi-cloud-upload:before{content:'\e03d'}.oi-cloud:before{content:'\e03e'}.oi-cloudy:before{content:'\e03f'}.oi-code:before{content:'\e040'}.oi-cog:before{content:'\e041'}.oi-collapse-down:before{content:'\e042'}.oi-collapse-left:before{content:'\e043'}.oi-collapse-right:before{content:'\e044'}.oi-collapse-up:before{content:'\e045'}.oi-command:before{content:'\e046'}.oi-comment-square:before{content:'\e047'}.oi-compass:before{content:'\e048'}.oi-contrast:before{content:'\e049'}.oi-copywriting:before{content:'\e04a'}.oi-credit-card:before{content:'\e04b'}.oi-crop:before{content:'\e04c'}.oi-dashboard:before{content:'\e04d'}.oi-data-transfer-download:before{content:'\e04e'}.oi-data-transfer-upload:before{content:'\e04f'}.oi-delete:before{content:'\e050'}.oi-dial:before{content:'\e051'}.oi-document:before{content:'\e052'}.oi-dollar:before{content:'\e053'}.oi-double-quote-sans-left:before{content:'\e054'}.oi-double-quote-sans-right:before{content:'\e055'}.oi-double-quote-serif-left:before{content:'\e056'}.oi-double-quote-serif-right:before{content:'\e057'}.oi-droplet:before{content:'\e058'}.oi-eject:before{content:'\e059'}.oi-elevator:before{content:'\e05a'}.oi-ellipses:before{content:'\e05b'}.oi-envelope-closed:before{content:'\e05c'}.oi-envelope-open:before{content:'\e05d'}.oi-euro:before{content:'\e05e'}.oi-excerpt:before{content:'\e05f'}.oi-expand-down:before{content:'\e060'}.oi-expand-left:before{content:'\e061'}.oi-expand-right:before{content:'\e062'}.oi-expand-up:before{content:'\e063'}.oi-external-link:before{content:'\e064'}.oi-eye:before{content:'\e065'}.oi-eyedropper:before{content:'\e066'}.oi-file:before{content:'\e067'}.oi-fire:before{content:'\e068'}.oi-flag:before{content:'\e069'}.oi-flash:before{content:'\e06a'}.oi-folder:before{content:'\e06b'}.oi-fork:before{content:'\e06c'}.oi-fullscreen-enter:before{content:'\e06d'}.oi-fullscreen-exit:before{content:'\e06e'}.oi-globe:before{content:'\e06f'}.oi-graph:before{content:'\e070'}.oi-grid-four-up:before{content:'\e071'}.oi-grid-three-up:before{content:'\e072'}.oi-grid-two-up:before{content:'\e073'}.oi-hard-drive:before{content:'\e074'}.oi-header:before{content:'\e075'}.oi-headphones:before{content:'\e076'}.oi-heart:before{content:'\e077'}.oi-home:before{content:'\e078'}.oi-image:before{content:'\e079'}.oi-inbox:before{content:'\e07a'}.oi-infinity:before{content:'\e07b'}.oi-info:before{content:'\e07c'}.oi-italic:before{content:'\e07d'}.oi-justify-center:before{content:'\e07e'}.oi-justify-left:before{content:'\e07f'}.oi-justify-right:before{content:'\e080'}.oi-key:before{content:'\e081'}.oi-laptop:before{content:'\e082'}.oi-layers:before{content:'\e083'}.oi-lightbulb:before{content:'\e084'}.oi-link-broken:before{content:'\e085'}.oi-link-intact:before{content:'\e086'}.oi-list-rich:before{content:'\e087'}.oi-list:before{content:'\e088'}.oi-location:before{content:'\e089'}.oi-lock-locked:before{content:'\e08a'}.oi-lock-unlocked:before{content:'\e08b'}.oi-loop-circular:before{content:'\e08c'}.oi-loop-square:before{content:'\e08d'}.oi-loop:before{content:'\e08e'}.oi-magnifying-glass:before{content:'\e08f'}.oi-map-marker:before{content:'\e090'}.oi-map:before{content:'\e091'}.oi-media-pause:before{content:'\e092'}.oi-media-play:before{content:'\e093'}.oi-media-record:before{content:'\e094'}.oi-media-skip-backward:before{content:'\e095'}.oi-media-skip-forward:before{content:'\e096'}.oi-media-step-backward:before{content:'\e097'}.oi-media-step-forward:before{content:'\e098'}.oi-media-stop:before{content:'\e099'}.oi-medical-cross:before{content:'\e09a'}.oi-menu:before{content:'\e09b'}.oi-microphone:before{content:'\e09c'}.oi-minus:before{content:'\e09d'}.oi-monitor:before{content:'\e09e'}.oi-moon:before{content:'\e09f'}.oi-move:before{content:'\e0a0'}.oi-musical-note:before{content:'\e0a1'}.oi-paperclip:before{content:'\e0a2'}.oi-pencil:before{content:'\e0a3'}.oi-people:before{content:'\e0a4'}.oi-person:before{content:'\e0a5'}.oi-phone:before{content:'\e0a6'}.oi-pie-chart:before{content:'\e0a7'}.oi-pin:before{content:'\e0a8'}.oi-play-circle:before{content:'\e0a9'}.oi-plus:before{content:'\e0aa'}.oi-power-standby:before{content:'\e0ab'}.oi-print:before{content:'\e0ac'}.oi-project:before{content:'\e0ad'}.oi-pulse:before{content:'\e0ae'}.oi-puzzle-piece:before{content:'\e0af'}.oi-question-mark:before{content:'\e0b0'}.oi-rain:before{content:'\e0b1'}.oi-random:before{content:'\e0b2'}.oi-reload:before{content:'\e0b3'}.oi-resize-both:before{content:'\e0b4'}.oi-resize-height:before{content:'\e0b5'}.oi-resize-width:before{content:'\e0b6'}.oi-rss-alt:before{content:'\e0b7'}.oi-rss:before{content:'\e0b8'}.oi-script:before{content:'\e0b9'}.oi-share-boxed:before{content:'\e0ba'}.oi-share:before{content:'\e0bb'}.oi-shield:before{content:'\e0bc'}.oi-signal:before{content:'\e0bd'}.oi-signpost:before{content:'\e0be'}.oi-sort-ascending:before{content:'\e0bf'}.oi-sort-descending:before{content:'\e0c0'}.oi-spreadsheet:before{content:'\e0c1'}.oi-star:before{content:'\e0c2'}.oi-sun:before{content:'\e0c3'}.oi-tablet:before{content:'\e0c4'}.oi-tag:before{content:'\e0c5'}.oi-tags:before{content:'\e0c6'}.oi-target:before{content:'\e0c7'}.oi-task:before{content:'\e0c8'}.oi-terminal:before{content:'\e0c9'}.oi-text:before{content:'\e0ca'}.oi-thumb-down:before{content:'\e0cb'}.oi-thumb-up:before{content:'\e0cc'}.oi-timer:before{content:'\e0cd'}.oi-transfer:before{content:'\e0ce'}.oi-trash:before{content:'\e0cf'}.oi-underline:before{content:'\e0d0'}.oi-vertical-align-bottom:before{content:'\e0d1'}.oi-vertical-align-center:before{content:'\e0d2'}.oi-vertical-align-top:before{content:'\e0d3'}.oi-video:before{content:'\e0d4'}.oi-volume-high:before{content:'\e0d5'}.oi-volume-low:before{content:'\e0d6'}.oi-volume-off:before{content:'\e0d7'}.oi-warning:before{content:'\e0d8'}.oi-wifi:before{content:'\e0d9'}.oi-wrench:before{content:'\e0da'}.oi-x:before{content:'\e0db'}.oi-yen:before{content:'\e0dc'}.oi-zoom-in:before{content:'\e0dd'}.oi-zoom-out:before{content:'\e0de'} -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.App/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottdock/Talks.FullStackAspNetCore30/d5bdec29054fcc33cb05be6fb466cec9d0c87c2f/demos/02-FullStackDemo/BlazorInsider.App/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.App/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottdock/Talks.FullStackAspNetCore30/d5bdec29054fcc33cb05be6fb466cec9d0c87c2f/demos/02-FullStackDemo/BlazorInsider.App/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.App/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottdock/Talks.FullStackAspNetCore30/d5bdec29054fcc33cb05be6fb466cec9d0c87c2f/demos/02-FullStackDemo/BlazorInsider.App/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.App/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottdock/Talks.FullStackAspNetCore30/d5bdec29054fcc33cb05be6fb466cec9d0c87c2f/demos/02-FullStackDemo/BlazorInsider.App/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.App/wwwroot/css/site.css: -------------------------------------------------------------------------------- 1 | @import url('open-iconic/font/css/open-iconic-bootstrap.min.css'); 2 | 3 | html, body { 4 | font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; 5 | } 6 | 7 | app { 8 | position: relative; 9 | display: flex; 10 | flex-direction: column; 11 | } 12 | 13 | .top-row { 14 | height: 3.5rem; 15 | display: flex; 16 | align-items: center; 17 | } 18 | 19 | .main { 20 | flex: 1; 21 | } 22 | 23 | .main .top-row { 24 | background-color: #e6e6e6; 25 | border-bottom: 1px solid #d6d5d5; 26 | } 27 | 28 | .sidebar { 29 | background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%); 30 | } 31 | 32 | .sidebar .top-row { 33 | background-color: rgba(0,0,0,0.4); 34 | } 35 | 36 | .sidebar .navbar-brand { 37 | font-size: 1.1rem; 38 | } 39 | 40 | .sidebar .oi { 41 | width: 2rem; 42 | font-size: 1.1rem; 43 | vertical-align: text-top; 44 | top: -2px; 45 | } 46 | 47 | .nav-item { 48 | font-size: 0.9rem; 49 | padding-bottom: 0.5rem; 50 | } 51 | 52 | .nav-item:first-of-type { 53 | padding-top: 1rem; 54 | } 55 | 56 | .nav-item:last-of-type { 57 | padding-bottom: 1rem; 58 | } 59 | 60 | .nav-item a { 61 | color: #d7d7d7; 62 | border-radius: 4px; 63 | height: 3rem; 64 | display: flex; 65 | align-items: center; 66 | line-height: 3rem; 67 | } 68 | 69 | .nav-item a.active { 70 | background-color: rgba(255,255,255,0.25); 71 | color: white; 72 | } 73 | 74 | .nav-item a:hover { 75 | background-color: rgba(255,255,255,0.1); 76 | color: white; 77 | } 78 | 79 | .content { 80 | padding-top: 1.1rem; 81 | } 82 | 83 | .navbar-toggler { 84 | background-color: rgba(255, 255, 255, 0.1); 85 | } 86 | 87 | .valid.modified:not([type=checkbox]) { 88 | outline: 1px solid #26b050; 89 | } 90 | 91 | .invalid { 92 | outline: 1px solid red; 93 | } 94 | 95 | .validation-message { 96 | color: red; 97 | } 98 | 99 | @media (max-width: 767.98px) { 100 | .main .top-row { 101 | display: none; 102 | } 103 | } 104 | 105 | @media (min-width: 768px) { 106 | app { 107 | flex-direction: row; 108 | } 109 | 110 | .sidebar { 111 | width: 250px; 112 | height: 100vh; 113 | position: sticky; 114 | top: 0; 115 | } 116 | 117 | .main .top-row { 118 | position: sticky; 119 | top: 0; 120 | } 121 | 122 | .main > div { 123 | padding-left: 2rem !important; 124 | padding-right: 1.5rem !important; 125 | } 126 | 127 | .navbar-toggler { 128 | display: none; 129 | } 130 | 131 | .sidebar .collapse { 132 | /* Never collapse the sidebar for wide screens */ 133 | display: block; 134 | } 135 | } 136 | 137 | * { 138 | -webkit-box-sizing: border-box; 139 | -moz-box-sizing: border-box; 140 | box-sizing: border-box; 141 | } 142 | 143 | *:before, *:after { 144 | -webkit-box-sizing: border-box; 145 | -moz-box-sizing: border-box; 146 | box-sizing: border-box; 147 | } 148 | 149 | body { 150 | font-family: "Helvetica Neue", "Helvetica", "Roboto", "Arial", sans-serif; 151 | color: #5e5d52; 152 | } 153 | 154 | a { 155 | color: #337aa8; 156 | } 157 | 158 | a:hover, a:focus { 159 | color: #4b8ab2; 160 | } 161 | 162 | .container { 163 | margin: 5% 3%; 164 | } 165 | 166 | @media (min-width: 48em) { 167 | .container { 168 | margin: 2%; 169 | } 170 | } 171 | 172 | @media (min-width: 75em) { 173 | .container { 174 | margin: 2em auto; 175 | max-width: 75em; 176 | } 177 | } 178 | 179 | .responsive-table { 180 | width: 100%; 181 | margin-bottom: 1.5em; 182 | border-spacing: 0; 183 | } 184 | 185 | @media (min-width: 48em) { 186 | .responsive-table { 187 | font-size: .9em; 188 | } 189 | } 190 | 191 | @media (min-width: 62em) { 192 | .responsive-table { 193 | font-size: 1em; 194 | } 195 | } 196 | 197 | .responsive-table thead { 198 | position: absolute; 199 | clip: rect(1px 1px 1px 1px); 200 | /* IE6, IE7 */ 201 | padding: 0; 202 | border: 0; 203 | height: 1px; 204 | width: 1px; 205 | overflow: hidden; 206 | } 207 | 208 | @media (min-width: 48em) { 209 | .responsive-table thead { 210 | position: relative; 211 | clip: auto; 212 | height: auto; 213 | width: auto; 214 | overflow: auto; 215 | } 216 | } 217 | 218 | .responsive-table thead th { 219 | background-color: #1d96b2; 220 | border: 1px solid #1d96b2; 221 | font-weight: normal; 222 | text-align: center; 223 | color: white; 224 | } 225 | 226 | .responsive-table thead th:first-of-type { 227 | text-align: left; 228 | } 229 | 230 | .responsive-table tbody, 231 | .responsive-table tr, 232 | .responsive-table th, 233 | .responsive-table td { 234 | display: block; 235 | padding: 0; 236 | text-align: left; 237 | white-space: normal; 238 | } 239 | 240 | @media (min-width: 48em) { 241 | .responsive-table tr { 242 | display: table-row; 243 | } 244 | } 245 | 246 | .responsive-table th, 247 | .responsive-table td { 248 | padding: .5em; 249 | vertical-align: middle; 250 | } 251 | 252 | @media (min-width: 30em) { 253 | .responsive-table th, 254 | .responsive-table td { 255 | padding: .75em .5em; 256 | } 257 | } 258 | 259 | @media (min-width: 48em) { 260 | .responsive-table th, 261 | .responsive-table td { 262 | display: table-cell; 263 | padding: .5em; 264 | } 265 | } 266 | 267 | @media (min-width: 62em) { 268 | .responsive-table th, 269 | .responsive-table td { 270 | padding: .75em .5em; 271 | } 272 | } 273 | 274 | @media (min-width: 75em) { 275 | .responsive-table th, 276 | .responsive-table td { 277 | padding: .75em; 278 | } 279 | } 280 | 281 | .responsive-table caption { 282 | margin-bottom: 1em; 283 | font-size: 1em; 284 | font-weight: bold; 285 | text-align: center; 286 | } 287 | 288 | @media (min-width: 48em) { 289 | .responsive-table caption { 290 | font-size: 1.5em; 291 | } 292 | } 293 | 294 | .responsive-table tfoot { 295 | font-size: .8em; 296 | font-style: italic; 297 | } 298 | 299 | @media (min-width: 62em) { 300 | .responsive-table tfoot { 301 | font-size: .9em; 302 | } 303 | } 304 | 305 | @media (min-width: 48em) { 306 | .responsive-table tbody { 307 | display: table-row-group; 308 | } 309 | } 310 | 311 | .responsive-table tbody tr { 312 | margin-bottom: 1em; 313 | } 314 | 315 | @media (min-width: 48em) { 316 | .responsive-table tbody tr { 317 | display: table-row; 318 | border-width: 1px; 319 | } 320 | } 321 | 322 | .responsive-table tbody tr:last-of-type { 323 | margin-bottom: 0; 324 | } 325 | 326 | @media (min-width: 48em) { 327 | .responsive-table tbody tr:nth-of-type(even) { 328 | background-color: rgba(94, 93, 82, 0.1); 329 | } 330 | } 331 | 332 | .responsive-table tbody th[scope="row"] { 333 | background-color: #1d96b2; 334 | color: white; 335 | } 336 | 337 | @media (min-width: 30em) { 338 | .responsive-table tbody th[scope="row"] { 339 | border-left: 1px solid #1d96b2; 340 | border-bottom: 1px solid #1d96b2; 341 | } 342 | } 343 | 344 | @media (min-width: 48em) { 345 | .responsive-table tbody th[scope="row"] { 346 | background-color: transparent; 347 | color: #5e5d52; 348 | text-align: left; 349 | } 350 | } 351 | 352 | .responsive-table tbody td { 353 | text-align: right; 354 | } 355 | 356 | @media (min-width: 48em) { 357 | .responsive-table tbody td { 358 | border-left: 1px solid #1d96b2; 359 | border-bottom: 1px solid #1d96b2; 360 | text-align: center; 361 | } 362 | } 363 | 364 | @media (min-width: 48em) { 365 | .responsive-table tbody td:last-of-type { 366 | border-right: 1px solid #1d96b2; 367 | } 368 | } 369 | 370 | .responsive-table tbody td[data-type=currency] { 371 | text-align: right; 372 | } 373 | 374 | .responsive-table tbody td[data-title]:before { 375 | content: attr(data-title); 376 | float: left; 377 | font-size: .8em; 378 | color: rgba(94, 93, 82, 0.75); 379 | } 380 | 381 | @media (min-width: 30em) { 382 | .responsive-table tbody td[data-title]:before { 383 | font-size: .9em; 384 | } 385 | } 386 | 387 | @media (min-width: 48em) { 388 | .responsive-table tbody td[data-title]:before { 389 | content: none; 390 | } 391 | } 392 | 393 | -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.App/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottdock/Talks.FullStackAspNetCore30/d5bdec29054fcc33cb05be6fb466cec9d0c87c2f/demos/02-FullStackDemo/BlazorInsider.App/wwwroot/favicon.ico -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.Shared/BlazorInsider.Shared.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.Shared/Model/Order.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace BlazorInsider.Shared.Model 4 | { 5 | public class Order 6 | { 7 | public int OrderId { get; set; } 8 | public string Description { get; set; } 9 | public int Quantity { get; set; } 10 | public double Total { get; set; } 11 | public string Status { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.Shared/Services/DatabaseService.cs: -------------------------------------------------------------------------------- 1 | using BlazorInsider.Shared.Model; 2 | using LiteDB; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.IO; 6 | using System.Linq; 7 | 8 | namespace BlazorInsider.App.Services 9 | { 10 | public class DatabaseService 11 | { 12 | string path = $"{Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData)}\\BlazorOrders\\BlazorOrders.db"; 13 | string folder = $"{Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData)}\\BlazorOrders\\"; 14 | 15 | public DatabaseService() 16 | { 17 | if (!Directory.Exists(folder)) 18 | { 19 | Directory.CreateDirectory(folder); 20 | } 21 | } 22 | 23 | public void AddOrder(Order order) 24 | { 25 | using (var connection = new LiteDatabase(path)) 26 | { 27 | var orders = connection.GetCollection(); 28 | orders.Insert(order); 29 | } 30 | } 31 | 32 | public List GetOrders() 33 | { 34 | using (var connection = new LiteDatabase(path)) 35 | { 36 | var orders = connection.GetCollection(); 37 | var result = orders.FindAll(); 38 | return result.ToList(); 39 | } 40 | } 41 | 42 | public Order GetPendingOrder() 43 | { 44 | using (var connection = new LiteDatabase(path)) 45 | { 46 | var orders = connection.GetCollection(); 47 | var result = orders.FindOne(x => x.Status == "Pending"); 48 | return result; 49 | } 50 | } 51 | 52 | public void UpdateOrder(int orderId) 53 | { 54 | using (var connection = new LiteDatabase(path)) 55 | { 56 | var orders = connection.GetCollection(); 57 | var order = orders.FindById(orderId); 58 | order.Status = "Processed"; 59 | 60 | orders.Update(order); 61 | } 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.Worker/BlazorInsider.Worker.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netcoreapp3.0 5 | dotnet-BlazorInsider.Worker-D1BA562D-71CF-4F0B-A32C-1F27E9E39245 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.Worker/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.Extensions.Configuration; 7 | using Microsoft.Extensions.DependencyInjection; 8 | using Microsoft.Extensions.Hosting; 9 | 10 | namespace BlazorInsider.Worker 11 | { 12 | public class Program 13 | { 14 | public static void Main(string[] args) 15 | { 16 | CreateHostBuilder(args).Build().Run(); 17 | } 18 | 19 | public static IHostBuilder CreateHostBuilder(string[] args) => 20 | Host.CreateDefaultBuilder(args) 21 | .UseWindowsService() 22 | .ConfigureServices(services => 23 | { 24 | services.AddHostedService(); 25 | }); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.Worker/Protos/ordershandler.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package OrdersHandler; 4 | 5 | // The greeting service definition. 6 | service OrdersManager { 7 | // Sends a greeting 8 | rpc GetNewOrder (OrderRequest) returns (OrderReply) {} 9 | rpc UpdateOrder (UpdateOrderRequest) returns (UpdateOrderResponse) {} 10 | } 11 | 12 | // The request message containing the user's name. 13 | message OrderRequest { 14 | 15 | } 16 | 17 | // The response message containing the greetings. 18 | message OrderReply { 19 | int32 orderId = 1; 20 | } 21 | 22 | message UpdateOrderRequest { 23 | int32 orderID = 1; 24 | } 25 | 26 | message UpdateOrderResponse { 27 | bool success = 1; 28 | string errorMessage = 2; 29 | } -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.Worker/Worker.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net.Http; 3 | using System.Threading; 4 | using System.Threading.Tasks; 5 | using BlazorInsider.App.Services; 6 | using Grpc.Net.Client; 7 | using Microsoft.Extensions.Hosting; 8 | using Microsoft.Extensions.Logging; 9 | using OrdersHandler; 10 | 11 | namespace BlazorInsider.Worker 12 | { 13 | public class Worker : BackgroundService 14 | { 15 | private readonly ILogger _logger; 16 | //private DatabaseService _databaseService; 17 | 18 | public Worker(ILogger logger) 19 | { 20 | _logger = logger; 21 | //_databaseService = new DatabaseService(); 22 | } 23 | 24 | protected override async Task ExecuteAsync(CancellationToken stoppingToken) 25 | { 26 | while (!stoppingToken.IsCancellationRequested) 27 | { 28 | _logger.LogInformation($"Checking orders at {DateTimeOffset.Now}"); 29 | try 30 | { 31 | AppContext.SetSwitch( 32 | "System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", 33 | true); 34 | 35 | var httpClient = new HttpClient(); 36 | httpClient.BaseAddress = new Uri("http://127.0.0.1:8194"); 37 | 38 | var grpcClient = GrpcClient.Create(httpClient); 39 | 40 | OrderRequest request = new OrderRequest(); 41 | OrderReply result = await grpcClient.GetNewOrderAsync(request); 42 | 43 | if (result.OrderId != 0) 44 | { 45 | var updateRequest = new UpdateOrderRequest() 46 | { 47 | OrderID = result.OrderId 48 | }; 49 | 50 | try 51 | { 52 | UpdateOrderResponse updateResponse = 53 | await grpcClient.UpdateOrderAsync(updateRequest); 54 | 55 | if (updateResponse.Success) 56 | { 57 | _logger.LogInformation($"Order with id {result.OrderId} has been processed"); 58 | } 59 | else 60 | { 61 | _logger.LogInformation($"Order with id {result.OrderId} was not updated and returned error {updateResponse.ErrorMessage}"); 62 | } 63 | } 64 | catch (Exception ex) 65 | { 66 | var msg = (ex.InnerException != null) 67 | ? $"{ex.Message} {ex.InnerException.Message} {ex.StackTrace}" 68 | : $"{ex.Message} {ex.StackTrace}"; 69 | _logger.LogInformation($"Order with id {result.OrderId} was not updated and returned error {msg}"); 70 | 71 | } 72 | } 73 | else 74 | { 75 | _logger.LogInformation($"No pending orders at {DateTimeOffset.Now}"); 76 | } 77 | } 78 | catch (Exception exc) 79 | { 80 | _logger.LogError(exc.Message + exc.StackTrace); 81 | } 82 | 83 | await Task.Delay(3000, stoppingToken); 84 | } 85 | } 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.Worker/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.Worker/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | }, 8 | "EventLog": { 9 | "LogLevel": { 10 | "Default": "Information", 11 | "Microsoft.Hosting.Lifetime": "Information" 12 | } 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /demos/02-FullStackDemo/BlazorInsider.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.28902.138 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorInsider.App", "BlazorInsider.App\BlazorInsider.App.csproj", "{8D1DC35D-5849-4801-B247-88D07CE49982}" 7 | EndProject 8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorInsider.Worker", "BlazorInsider.Worker\BlazorInsider.Worker.csproj", "{FD4D41F3-F047-487C-A01C-BFEC5363FDC3}" 9 | EndProject 10 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorInsider.Shared", "BlazorInsider.Shared\BlazorInsider.Shared.csproj", "{87E89FDE-9944-40DA-A8D5-BE726DD4D638}" 11 | EndProject 12 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution Files", "{2C563862-E84B-4223-91A3-54FC0A04080D}" 13 | ProjectSection(SolutionItems) = preProject 14 | global.json = global.json 15 | EndProjectSection 16 | EndProject 17 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorInsider.Api", "BlazorInsider.Api\BlazorInsider.Api.csproj", "{DB012857-A2D9-4FA3-9F17-4810EF1BBA5F}" 18 | EndProject 19 | Global 20 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 21 | Debug|Any CPU = Debug|Any CPU 22 | Release|Any CPU = Release|Any CPU 23 | EndGlobalSection 24 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 25 | {8D1DC35D-5849-4801-B247-88D07CE49982}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 26 | {8D1DC35D-5849-4801-B247-88D07CE49982}.Debug|Any CPU.Build.0 = Debug|Any CPU 27 | {8D1DC35D-5849-4801-B247-88D07CE49982}.Release|Any CPU.ActiveCfg = Release|Any CPU 28 | {8D1DC35D-5849-4801-B247-88D07CE49982}.Release|Any CPU.Build.0 = Release|Any CPU 29 | {FD4D41F3-F047-487C-A01C-BFEC5363FDC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 30 | {FD4D41F3-F047-487C-A01C-BFEC5363FDC3}.Debug|Any CPU.Build.0 = Debug|Any CPU 31 | {FD4D41F3-F047-487C-A01C-BFEC5363FDC3}.Release|Any CPU.ActiveCfg = Release|Any CPU 32 | {FD4D41F3-F047-487C-A01C-BFEC5363FDC3}.Release|Any CPU.Build.0 = Release|Any CPU 33 | {87E89FDE-9944-40DA-A8D5-BE726DD4D638}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 34 | {87E89FDE-9944-40DA-A8D5-BE726DD4D638}.Debug|Any CPU.Build.0 = Debug|Any CPU 35 | {87E89FDE-9944-40DA-A8D5-BE726DD4D638}.Release|Any CPU.ActiveCfg = Release|Any CPU 36 | {87E89FDE-9944-40DA-A8D5-BE726DD4D638}.Release|Any CPU.Build.0 = Release|Any CPU 37 | {DB012857-A2D9-4FA3-9F17-4810EF1BBA5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 38 | {DB012857-A2D9-4FA3-9F17-4810EF1BBA5F}.Debug|Any CPU.Build.0 = Debug|Any CPU 39 | {DB012857-A2D9-4FA3-9F17-4810EF1BBA5F}.Release|Any CPU.ActiveCfg = Release|Any CPU 40 | {DB012857-A2D9-4FA3-9F17-4810EF1BBA5F}.Release|Any CPU.Build.0 = Release|Any CPU 41 | EndGlobalSection 42 | GlobalSection(SolutionProperties) = preSolution 43 | HideSolutionNode = FALSE 44 | EndGlobalSection 45 | GlobalSection(ExtensibilityGlobals) = postSolution 46 | SolutionGuid = {8DFD4DB2-8440-4600-A99B-5EB16C6B4CD9} 47 | EndGlobalSection 48 | EndGlobal 49 | -------------------------------------------------------------------------------- /demos/02-FullStackDemo/global.json: -------------------------------------------------------------------------------- 1 | { 2 | "sdk": { 3 | "version": "3.0.100-preview5-011568" 4 | } 5 | } -------------------------------------------------------------------------------- /demos/readme.txt: -------------------------------------------------------------------------------- 1 | Before session, pre-load the following 2 | 3 | __ Demo1 source 4 | __ Magnifier 5 | __ This TXT file 6 | __ EventLog 7 | __ Services control panel 8 | __ Empty Visual Studio 2019 16.2 Preview 9 | __ Increase system fonts 10 | 11 | ----------------------------------- 12 | Demo 1 13 | ----------------------------------- 14 | 15 | Replace this 16 | 17 | With this 18 | 19 | 20 | 21 | Date 22 | Temp. (C) 23 | Temp. (F) 24 | Summary 25 | 26 | 27 | @context.Date.ToShortDateString() 28 | @context.TemperatureC 29 | @context.TemperatureF 30 | @context.Summary 31 | 32 | 33 | 34 | ----------------------------------- 35 | Demo 3 - Full Stack 36 | ----------------------------------- 37 | First change directory to worker process 38 | 39 | cd c:\Code\fwdnug\InsiderDevTourDemos19\Sessions\aspNet\03-Orders\01-Start\BlazorInsider.Worker 40 | 41 | Then, Complete build 42 | dotnet build 43 | ``` 44 | Then let's publish the project in a folder in C:\: 45 | 46 | ```powershell 47 | dotnet publish -o C:\OrdersService 48 | ``` 49 | Now let's create a service using the output of the build. Copy and paste the following command: 50 | 51 | ```powershell 52 | sc create worker1 binPath=C:\OrdersService\BlazorInsider.Worker.exe 53 | ``` 54 | 55 | Once the service has been installed, run it with the following command: 56 | 57 | ```powershell 58 | sc start worker1 59 | 60 | To clean up 61 | 62 | sc stop worker1 63 | sc delete worker1 -------------------------------------------------------------------------------- /slides/001-full stack .net core 3.0.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottdock/Talks.FullStackAspNetCore30/d5bdec29054fcc33cb05be6fb466cec9d0c87c2f/slides/001-full stack .net core 3.0.pptx -------------------------------------------------------------------------------- /slides/002-net core is the future.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottdock/Talks.FullStackAspNetCore30/d5bdec29054fcc33cb05be6fb466cec9d0c87c2f/slides/002-net core is the future.pptx -------------------------------------------------------------------------------- /slides/2019-08-12 c# full stack asp.net core 3.0.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottdock/Talks.FullStackAspNetCore30/d5bdec29054fcc33cb05be6fb466cec9d0c87c2f/slides/2019-08-12 c# full stack asp.net core 3.0.pptx -------------------------------------------------------------------------------- /slides/2019-09-10 c# full stack asp.net core 3.0.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottdock/Talks.FullStackAspNetCore30/d5bdec29054fcc33cb05be6fb466cec9d0c87c2f/slides/2019-09-10 c# full stack asp.net core 3.0.pptx -------------------------------------------------------------------------------- /slides/2019-10-10 Hands On Application Develoment with .net core 3.0.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottdock/Talks.FullStackAspNetCore30/d5bdec29054fcc33cb05be6fb466cec9d0c87c2f/slides/2019-10-10 Hands On Application Develoment with .net core 3.0.pptx --------------------------------------------------------------------------------