├── .gitignore ├── LICENSE ├── README.md ├── SharedLib ├── Data │ └── LibDbContext.cs ├── Migrations │ ├── 20191214174757_InitialMigration.Designer.cs │ ├── 20191214174757_InitialMigration.cs │ ├── 20191214180556_AddedCinematicItem.Designer.cs │ ├── 20191214180556_AddedCinematicItem.cs │ └── LibDbContextModelSnapshot.cs ├── Models │ └── CinematicItem.cs ├── Services │ ├── CinematicItemService.cs │ └── ICinematicItemService.cs └── SharedLib.csproj ├── WebAppBlazor ├── App.razor ├── Areas │ └── Identity │ │ ├── Pages │ │ ├── Account │ │ │ └── LogOut.cshtml │ │ └── Shared │ │ │ └── _LoginPartial.cshtml │ │ └── RevalidatingIdentityAuthenticationStateProvider.cs ├── Data │ ├── WeatherForecast.cs │ └── WeatherForecastService.cs ├── Pages │ ├── CinematicDetail.razor │ ├── CinematicItems.razor │ ├── Counter.razor │ ├── Error.razor │ ├── FetchData.razor │ ├── Index.razor │ └── _Host.cshtml ├── Program.cs ├── Properties │ └── launchSettings.json ├── Shared │ ├── ConfirmDialog.razor │ ├── LoginDisplay.razor │ ├── MainLayout.razor │ └── NavMenu.razor ├── Startup.cs ├── WebAppBlazor.csproj ├── _Imports.razor ├── appsettings.Development.json ├── appsettings.json ├── libman.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 │ └── lib │ ├── bootstrap │ └── dist │ │ └── js │ │ └── bootstrap.min.js │ └── jquery │ └── dist │ └── jquery.min.js ├── WebAppMvc ├── Areas │ └── Identity │ │ └── Pages │ │ └── _ViewStart.cshtml ├── Controllers │ ├── CinematicItemsController.cs │ ├── CinematicItemsUsingServiceController.cs │ └── HomeController.cs ├── Models │ └── ErrorViewModel.cs ├── Program.cs ├── Properties │ └── launchSettings.json ├── Startup.cs ├── Views │ ├── CinematicItems │ │ ├── Create.cshtml │ │ ├── Delete.cshtml │ │ ├── Details.cshtml │ │ ├── Edit.cshtml │ │ └── Index.cshtml │ ├── Home │ │ ├── Index.cshtml │ │ └── Privacy.cshtml │ ├── Shared │ │ ├── Error.cshtml │ │ ├── _Layout.cshtml │ │ ├── _LoginPartial.cshtml │ │ └── _ValidationScriptsPartial.cshtml │ ├── _ViewImports.cshtml │ └── _ViewStart.cshtml ├── WebAppMvc.csproj ├── WebAppMvc.sln ├── appsettings.Development.json ├── appsettings.json └── wwwroot │ ├── css │ └── site.css │ ├── favicon.ico │ ├── js │ └── site.js │ └── lib │ ├── bootstrap │ ├── LICENSE │ └── dist │ │ ├── css │ │ ├── bootstrap-grid.css │ │ ├── bootstrap-grid.css.map │ │ ├── bootstrap-grid.min.css │ │ ├── bootstrap-grid.min.css.map │ │ ├── bootstrap-reboot.css │ │ ├── bootstrap-reboot.css.map │ │ ├── bootstrap-reboot.min.css │ │ ├── bootstrap-reboot.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ │ └── js │ │ ├── bootstrap.bundle.js │ │ ├── bootstrap.bundle.js.map │ │ ├── bootstrap.bundle.min.js │ │ ├── bootstrap.bundle.min.js.map │ │ ├── bootstrap.js │ │ ├── bootstrap.js.map │ │ ├── bootstrap.min.js │ │ └── bootstrap.min.js.map │ ├── jquery-validation-unobtrusive │ ├── LICENSE.txt │ ├── jquery.validate.unobtrusive.js │ └── jquery.validate.unobtrusive.min.js │ ├── jquery-validation │ ├── LICENSE.md │ └── dist │ │ ├── additional-methods.js │ │ ├── additional-methods.min.js │ │ ├── jquery.validate.js │ │ └── jquery.validate.min.js │ └── jquery │ ├── LICENSE.txt │ └── dist │ ├── jquery.js │ ├── jquery.min.js │ └── jquery.min.map ├── WebAppPages ├── Areas │ └── Identity │ │ └── Pages │ │ └── _ViewStart.cshtml ├── Pages │ ├── CinematicItems │ │ ├── Create.cshtml │ │ ├── Create.cshtml.cs │ │ ├── Delete.cshtml │ │ ├── Delete.cshtml.cs │ │ ├── Details.cshtml │ │ ├── Details.cshtml.cs │ │ ├── Edit.cshtml │ │ ├── Edit.cshtml.cs │ │ ├── Index.cshtml │ │ └── Index.cshtml.cs │ ├── Error.cshtml │ ├── Error.cshtml.cs │ ├── Index.cshtml │ ├── Index.cshtml.cs │ ├── Privacy.cshtml │ ├── Privacy.cshtml.cs │ ├── Shared │ │ ├── _Layout.cshtml │ │ ├── _LoginPartial.cshtml │ │ └── _ValidationScriptsPartial.cshtml │ ├── _ViewImports.cshtml │ └── _ViewStart.cshtml ├── Program.cs ├── Properties │ └── launchSettings.json ├── Startup.cs ├── WebAppPages.csproj ├── appsettings.Development.json ├── appsettings.json └── wwwroot │ ├── css │ └── site.css │ ├── favicon.ico │ ├── js │ └── site.js │ └── lib │ ├── bootstrap │ ├── LICENSE │ └── dist │ │ ├── css │ │ ├── bootstrap-grid.css │ │ ├── bootstrap-grid.css.map │ │ ├── bootstrap-grid.min.css │ │ ├── bootstrap-grid.min.css.map │ │ ├── bootstrap-reboot.css │ │ ├── bootstrap-reboot.css.map │ │ ├── bootstrap-reboot.min.css │ │ ├── bootstrap-reboot.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ │ └── js │ │ ├── bootstrap.bundle.js │ │ ├── bootstrap.bundle.js.map │ │ ├── bootstrap.bundle.min.js │ │ ├── bootstrap.bundle.min.js.map │ │ ├── bootstrap.js │ │ ├── bootstrap.js.map │ │ ├── bootstrap.min.js │ │ └── bootstrap.min.js.map │ ├── jquery-validation-unobtrusive │ ├── LICENSE.txt │ ├── jquery.validate.unobtrusive.js │ └── jquery.validate.unobtrusive.min.js │ ├── jquery-validation │ ├── LICENSE.md │ └── dist │ │ ├── additional-methods.js │ │ ├── additional-methods.min.js │ │ ├── jquery.validate.js │ │ └── jquery.validate.min.js │ └── jquery │ ├── LICENSE.txt │ └── dist │ ├── jquery.js │ ├── jquery.min.js │ └── jquery.min.map └── WebAppsWithSharedLib.sln /.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 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Aa][Rr][Mm]/ 27 | [Aa][Rr][Mm]64/ 28 | bld/ 29 | [Bb]in/ 30 | [Oo]bj/ 31 | [Ll]og/ 32 | [Ll]ogs/ 33 | 34 | # Visual Studio 2015/2017 cache/options directory 35 | .vs/ 36 | # Uncomment if you have tasks that create the project's static files in wwwroot 37 | #wwwroot/ 38 | 39 | # Visual Studio 2017 auto generated files 40 | Generated\ Files/ 41 | 42 | # MSTest test Results 43 | [Tt]est[Rr]esult*/ 44 | [Bb]uild[Ll]og.* 45 | 46 | # NUnit 47 | *.VisualState.xml 48 | TestResult.xml 49 | nunit-*.xml 50 | 51 | # Build Results of an ATL Project 52 | [Dd]ebugPS/ 53 | [Rr]eleasePS/ 54 | dlldata.c 55 | 56 | # Benchmark Results 57 | BenchmarkDotNet.Artifacts/ 58 | 59 | # .NET Core 60 | project.lock.json 61 | project.fragment.lock.json 62 | artifacts/ 63 | 64 | # StyleCop 65 | StyleCopReport.xml 66 | 67 | # Files built by Visual Studio 68 | *_i.c 69 | *_p.c 70 | *_h.h 71 | *.ilk 72 | *.meta 73 | *.obj 74 | *.iobj 75 | *.pch 76 | *.pdb 77 | *.ipdb 78 | *.pgc 79 | *.pgd 80 | *.rsp 81 | *.sbr 82 | *.tlb 83 | *.tli 84 | *.tlh 85 | *.tmp 86 | *.tmp_proj 87 | *_wpftmp.csproj 88 | *.log 89 | *.vspscc 90 | *.vssscc 91 | .builds 92 | *.pidb 93 | *.svclog 94 | *.scc 95 | 96 | # Chutzpah Test files 97 | _Chutzpah* 98 | 99 | # Visual C++ cache files 100 | ipch/ 101 | *.aps 102 | *.ncb 103 | *.opendb 104 | *.opensdf 105 | *.sdf 106 | *.cachefile 107 | *.VC.db 108 | *.VC.VC.opendb 109 | 110 | # Visual Studio profiler 111 | *.psess 112 | *.vsp 113 | *.vspx 114 | *.sap 115 | 116 | # Visual Studio Trace Files 117 | *.e2e 118 | 119 | # TFS 2012 Local Workspace 120 | $tf/ 121 | 122 | # Guidance Automation Toolkit 123 | *.gpState 124 | 125 | # ReSharper is a .NET coding add-in 126 | _ReSharper*/ 127 | *.[Rr]e[Ss]harper 128 | *.DotSettings.user 129 | 130 | # TeamCity is a build add-in 131 | _TeamCity* 132 | 133 | # DotCover is a Code Coverage Tool 134 | *.dotCover 135 | 136 | # AxoCover is a Code Coverage Tool 137 | .axoCover/* 138 | !.axoCover/settings.json 139 | 140 | # Visual Studio code coverage results 141 | *.coverage 142 | *.coveragexml 143 | 144 | # NCrunch 145 | _NCrunch_* 146 | .*crunch*.local.xml 147 | nCrunchTemp_* 148 | 149 | # MightyMoose 150 | *.mm.* 151 | AutoTest.Net/ 152 | 153 | # Web workbench (sass) 154 | .sass-cache/ 155 | 156 | # Installshield output folder 157 | [Ee]xpress/ 158 | 159 | # DocProject is a documentation generator add-in 160 | DocProject/buildhelp/ 161 | DocProject/Help/*.HxT 162 | DocProject/Help/*.HxC 163 | DocProject/Help/*.hhc 164 | DocProject/Help/*.hhk 165 | DocProject/Help/*.hhp 166 | DocProject/Help/Html2 167 | DocProject/Help/html 168 | 169 | # Click-Once directory 170 | publish/ 171 | 172 | # Publish Web Output 173 | *.[Pp]ublish.xml 174 | *.azurePubxml 175 | # Note: Comment the next line if you want to checkin your web deploy settings, 176 | # but database connection strings (with potential passwords) will be unencrypted 177 | *.pubxml 178 | *.publishproj 179 | 180 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 181 | # checkin your Azure Web App publish settings, but sensitive information contained 182 | # in these scripts will be unencrypted 183 | PublishScripts/ 184 | 185 | # NuGet Packages 186 | *.nupkg 187 | # NuGet Symbol Packages 188 | *.snupkg 189 | # The packages folder can be ignored because of Package Restore 190 | **/[Pp]ackages/* 191 | # except build/, which is used as an MSBuild target. 192 | !**/[Pp]ackages/build/ 193 | # Uncomment if necessary however generally it will be regenerated when needed 194 | #!**/[Pp]ackages/repositories.config 195 | # NuGet v3's project.json files produces more ignorable files 196 | *.nuget.props 197 | *.nuget.targets 198 | 199 | # Microsoft Azure Build Output 200 | csx/ 201 | *.build.csdef 202 | 203 | # Microsoft Azure Emulator 204 | ecf/ 205 | rcf/ 206 | 207 | # Windows Store app package directories and files 208 | AppPackages/ 209 | BundleArtifacts/ 210 | Package.StoreAssociation.xml 211 | _pkginfo.txt 212 | *.appx 213 | *.appxbundle 214 | *.appxupload 215 | 216 | # Visual Studio cache files 217 | # files ending in .cache can be ignored 218 | *.[Cc]ache 219 | # but keep track of directories ending in .cache 220 | !?*.[Cc]ache/ 221 | 222 | # Others 223 | ClientBin/ 224 | ~$* 225 | *~ 226 | *.dbmdl 227 | *.dbproj.schemaview 228 | *.jfm 229 | *.pfx 230 | *.publishsettings 231 | orleans.codegen.cs 232 | 233 | # Including strong name files can present a security risk 234 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 235 | #*.snk 236 | 237 | # Since there are multiple workflows, uncomment next line to ignore bower_components 238 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 239 | #bower_components/ 240 | 241 | # RIA/Silverlight projects 242 | Generated_Code/ 243 | 244 | # Backup & report files from converting an old project file 245 | # to a newer Visual Studio version. Backup files are not needed, 246 | # because we have git ;-) 247 | _UpgradeReport_Files/ 248 | Backup*/ 249 | UpgradeLog*.XML 250 | UpgradeLog*.htm 251 | ServiceFabricBackup/ 252 | *.rptproj.bak 253 | 254 | # SQL Server files 255 | *.mdf 256 | *.ldf 257 | *.ndf 258 | 259 | # Business Intelligence projects 260 | *.rdl.data 261 | *.bim.layout 262 | *.bim_*.settings 263 | *.rptproj.rsuser 264 | *- [Bb]ackup.rdl 265 | *- [Bb]ackup ([0-9]).rdl 266 | *- [Bb]ackup ([0-9][0-9]).rdl 267 | 268 | # Microsoft Fakes 269 | FakesAssemblies/ 270 | 271 | # GhostDoc plugin setting file 272 | *.GhostDoc.xml 273 | 274 | # Node.js Tools for Visual Studio 275 | .ntvs_analysis.dat 276 | node_modules/ 277 | 278 | # Visual Studio 6 build log 279 | *.plg 280 | 281 | # Visual Studio 6 workspace options file 282 | *.opt 283 | 284 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 285 | *.vbw 286 | 287 | # Visual Studio LightSwitch build output 288 | **/*.HTMLClient/GeneratedArtifacts 289 | **/*.DesktopClient/GeneratedArtifacts 290 | **/*.DesktopClient/ModelManifest.xml 291 | **/*.Server/GeneratedArtifacts 292 | **/*.Server/ModelManifest.xml 293 | _Pvt_Extensions 294 | 295 | # Paket dependency manager 296 | .paket/paket.exe 297 | paket-files/ 298 | 299 | # FAKE - F# Make 300 | .fake/ 301 | 302 | # CodeRush personal settings 303 | .cr/personal 304 | 305 | # Python Tools for Visual Studio (PTVS) 306 | __pycache__/ 307 | *.pyc 308 | 309 | # Cake - Uncomment if you are using it 310 | # tools/** 311 | # !tools/packages.config 312 | 313 | # Tabs Studio 314 | *.tss 315 | 316 | # Telerik's JustMock configuration file 317 | *.jmconfig 318 | 319 | # BizTalk build output 320 | *.btp.cs 321 | *.btm.cs 322 | *.odx.cs 323 | *.xsd.cs 324 | 325 | # OpenCover UI analysis results 326 | OpenCover/ 327 | 328 | # Azure Stream Analytics local run output 329 | ASALocalRun/ 330 | 331 | # MSBuild Binary and Structured Log 332 | *.binlog 333 | 334 | # NVidia Nsight GPU debugger configuration file 335 | *.nvuser 336 | 337 | # MFractors (Xamarin productivity tool) working folder 338 | .mfractor/ 339 | 340 | # Local History for Visual Studio 341 | .localhistory/ 342 | 343 | # BeatPulse healthcheck temp database 344 | healthchecksdb 345 | 346 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 347 | MigrationBackup/ 348 | 349 | # Ionide (cross platform F# VS Code tools) working folder 350 | .ionide/ 351 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 shahedc 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 all 13 | 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 THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # WebAppsWithSharedLib 2 | ASP .NET Core Web Apps with Shared Library 3 | -------------------------------------------------------------------------------- /SharedLib/Data/LibDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Identity.EntityFrameworkCore; 2 | using Microsoft.EntityFrameworkCore; 3 | using SharedLib.Models; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Text; 7 | 8 | namespace SharedLib.Data 9 | { 10 | public class LibDbContext : IdentityDbContext 11 | { 12 | public LibDbContext(DbContextOptions options) 13 | : base(options) 14 | { 15 | } 16 | 17 | protected LibDbContext() 18 | { 19 | 20 | } 21 | 22 | public DbSet CinematicItems { get; set; } 23 | 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /SharedLib/Migrations/20191214174757_InitialMigration.Designer.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using Microsoft.EntityFrameworkCore; 4 | using Microsoft.EntityFrameworkCore.Infrastructure; 5 | using Microsoft.EntityFrameworkCore.Metadata; 6 | using Microsoft.EntityFrameworkCore.Migrations; 7 | using Microsoft.EntityFrameworkCore.Storage.ValueConversion; 8 | using SharedLib.Data; 9 | 10 | namespace SharedLib.Migrations 11 | { 12 | [DbContext(typeof(LibDbContext))] 13 | [Migration("20191214174757_InitialMigration")] 14 | partial class InitialMigration 15 | { 16 | protected override void BuildTargetModel(ModelBuilder modelBuilder) 17 | { 18 | #pragma warning disable 612, 618 19 | modelBuilder 20 | .HasAnnotation("ProductVersion", "3.1.0") 21 | .HasAnnotation("Relational:MaxIdentifierLength", 128) 22 | .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); 23 | 24 | modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => 25 | { 26 | b.Property("Id") 27 | .HasColumnType("nvarchar(450)"); 28 | 29 | b.Property("ConcurrencyStamp") 30 | .IsConcurrencyToken() 31 | .HasColumnType("nvarchar(max)"); 32 | 33 | b.Property("Name") 34 | .HasColumnType("nvarchar(256)") 35 | .HasMaxLength(256); 36 | 37 | b.Property("NormalizedName") 38 | .HasColumnType("nvarchar(256)") 39 | .HasMaxLength(256); 40 | 41 | b.HasKey("Id"); 42 | 43 | b.HasIndex("NormalizedName") 44 | .IsUnique() 45 | .HasName("RoleNameIndex") 46 | .HasFilter("[NormalizedName] IS NOT NULL"); 47 | 48 | b.ToTable("AspNetRoles"); 49 | }); 50 | 51 | modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => 52 | { 53 | b.Property("Id") 54 | .ValueGeneratedOnAdd() 55 | .HasColumnType("int") 56 | .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); 57 | 58 | b.Property("ClaimType") 59 | .HasColumnType("nvarchar(max)"); 60 | 61 | b.Property("ClaimValue") 62 | .HasColumnType("nvarchar(max)"); 63 | 64 | b.Property("RoleId") 65 | .IsRequired() 66 | .HasColumnType("nvarchar(450)"); 67 | 68 | b.HasKey("Id"); 69 | 70 | b.HasIndex("RoleId"); 71 | 72 | b.ToTable("AspNetRoleClaims"); 73 | }); 74 | 75 | modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b => 76 | { 77 | b.Property("Id") 78 | .HasColumnType("nvarchar(450)"); 79 | 80 | b.Property("AccessFailedCount") 81 | .HasColumnType("int"); 82 | 83 | b.Property("ConcurrencyStamp") 84 | .IsConcurrencyToken() 85 | .HasColumnType("nvarchar(max)"); 86 | 87 | b.Property("Email") 88 | .HasColumnType("nvarchar(256)") 89 | .HasMaxLength(256); 90 | 91 | b.Property("EmailConfirmed") 92 | .HasColumnType("bit"); 93 | 94 | b.Property("LockoutEnabled") 95 | .HasColumnType("bit"); 96 | 97 | b.Property("LockoutEnd") 98 | .HasColumnType("datetimeoffset"); 99 | 100 | b.Property("NormalizedEmail") 101 | .HasColumnType("nvarchar(256)") 102 | .HasMaxLength(256); 103 | 104 | b.Property("NormalizedUserName") 105 | .HasColumnType("nvarchar(256)") 106 | .HasMaxLength(256); 107 | 108 | b.Property("PasswordHash") 109 | .HasColumnType("nvarchar(max)"); 110 | 111 | b.Property("PhoneNumber") 112 | .HasColumnType("nvarchar(max)"); 113 | 114 | b.Property("PhoneNumberConfirmed") 115 | .HasColumnType("bit"); 116 | 117 | b.Property("SecurityStamp") 118 | .HasColumnType("nvarchar(max)"); 119 | 120 | b.Property("TwoFactorEnabled") 121 | .HasColumnType("bit"); 122 | 123 | b.Property("UserName") 124 | .HasColumnType("nvarchar(256)") 125 | .HasMaxLength(256); 126 | 127 | b.HasKey("Id"); 128 | 129 | b.HasIndex("NormalizedEmail") 130 | .HasName("EmailIndex"); 131 | 132 | b.HasIndex("NormalizedUserName") 133 | .IsUnique() 134 | .HasName("UserNameIndex") 135 | .HasFilter("[NormalizedUserName] IS NOT NULL"); 136 | 137 | b.ToTable("AspNetUsers"); 138 | }); 139 | 140 | modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => 141 | { 142 | b.Property("Id") 143 | .ValueGeneratedOnAdd() 144 | .HasColumnType("int") 145 | .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); 146 | 147 | b.Property("ClaimType") 148 | .HasColumnType("nvarchar(max)"); 149 | 150 | b.Property("ClaimValue") 151 | .HasColumnType("nvarchar(max)"); 152 | 153 | b.Property("UserId") 154 | .IsRequired() 155 | .HasColumnType("nvarchar(450)"); 156 | 157 | b.HasKey("Id"); 158 | 159 | b.HasIndex("UserId"); 160 | 161 | b.ToTable("AspNetUserClaims"); 162 | }); 163 | 164 | modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => 165 | { 166 | b.Property("LoginProvider") 167 | .HasColumnType("nvarchar(128)") 168 | .HasMaxLength(128); 169 | 170 | b.Property("ProviderKey") 171 | .HasColumnType("nvarchar(128)") 172 | .HasMaxLength(128); 173 | 174 | b.Property("ProviderDisplayName") 175 | .HasColumnType("nvarchar(max)"); 176 | 177 | b.Property("UserId") 178 | .IsRequired() 179 | .HasColumnType("nvarchar(450)"); 180 | 181 | b.HasKey("LoginProvider", "ProviderKey"); 182 | 183 | b.HasIndex("UserId"); 184 | 185 | b.ToTable("AspNetUserLogins"); 186 | }); 187 | 188 | modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => 189 | { 190 | b.Property("UserId") 191 | .HasColumnType("nvarchar(450)"); 192 | 193 | b.Property("RoleId") 194 | .HasColumnType("nvarchar(450)"); 195 | 196 | b.HasKey("UserId", "RoleId"); 197 | 198 | b.HasIndex("RoleId"); 199 | 200 | b.ToTable("AspNetUserRoles"); 201 | }); 202 | 203 | modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => 204 | { 205 | b.Property("UserId") 206 | .HasColumnType("nvarchar(450)"); 207 | 208 | b.Property("LoginProvider") 209 | .HasColumnType("nvarchar(128)") 210 | .HasMaxLength(128); 211 | 212 | b.Property("Name") 213 | .HasColumnType("nvarchar(128)") 214 | .HasMaxLength(128); 215 | 216 | b.Property("Value") 217 | .HasColumnType("nvarchar(max)"); 218 | 219 | b.HasKey("UserId", "LoginProvider", "Name"); 220 | 221 | b.ToTable("AspNetUserTokens"); 222 | }); 223 | 224 | modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => 225 | { 226 | b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) 227 | .WithMany() 228 | .HasForeignKey("RoleId") 229 | .OnDelete(DeleteBehavior.Cascade) 230 | .IsRequired(); 231 | }); 232 | 233 | modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => 234 | { 235 | b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) 236 | .WithMany() 237 | .HasForeignKey("UserId") 238 | .OnDelete(DeleteBehavior.Cascade) 239 | .IsRequired(); 240 | }); 241 | 242 | modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => 243 | { 244 | b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) 245 | .WithMany() 246 | .HasForeignKey("UserId") 247 | .OnDelete(DeleteBehavior.Cascade) 248 | .IsRequired(); 249 | }); 250 | 251 | modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => 252 | { 253 | b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) 254 | .WithMany() 255 | .HasForeignKey("RoleId") 256 | .OnDelete(DeleteBehavior.Cascade) 257 | .IsRequired(); 258 | 259 | b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) 260 | .WithMany() 261 | .HasForeignKey("UserId") 262 | .OnDelete(DeleteBehavior.Cascade) 263 | .IsRequired(); 264 | }); 265 | 266 | modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => 267 | { 268 | b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) 269 | .WithMany() 270 | .HasForeignKey("UserId") 271 | .OnDelete(DeleteBehavior.Cascade) 272 | .IsRequired(); 273 | }); 274 | #pragma warning restore 612, 618 275 | } 276 | } 277 | } 278 | -------------------------------------------------------------------------------- /SharedLib/Migrations/20191214174757_InitialMigration.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.EntityFrameworkCore.Migrations; 3 | 4 | namespace SharedLib.Migrations 5 | { 6 | public partial class InitialMigration : Migration 7 | { 8 | protected override void Up(MigrationBuilder migrationBuilder) 9 | { 10 | migrationBuilder.CreateTable( 11 | name: "AspNetRoles", 12 | columns: table => new 13 | { 14 | Id = table.Column(nullable: false), 15 | Name = table.Column(maxLength: 256, nullable: true), 16 | NormalizedName = table.Column(maxLength: 256, nullable: true), 17 | ConcurrencyStamp = table.Column(nullable: true) 18 | }, 19 | constraints: table => 20 | { 21 | table.PrimaryKey("PK_AspNetRoles", x => x.Id); 22 | }); 23 | 24 | migrationBuilder.CreateTable( 25 | name: "AspNetUsers", 26 | columns: table => new 27 | { 28 | Id = table.Column(nullable: false), 29 | UserName = table.Column(maxLength: 256, nullable: true), 30 | NormalizedUserName = table.Column(maxLength: 256, nullable: true), 31 | Email = table.Column(maxLength: 256, nullable: true), 32 | NormalizedEmail = table.Column(maxLength: 256, nullable: true), 33 | EmailConfirmed = table.Column(nullable: false), 34 | PasswordHash = table.Column(nullable: true), 35 | SecurityStamp = table.Column(nullable: true), 36 | ConcurrencyStamp = table.Column(nullable: true), 37 | PhoneNumber = table.Column(nullable: true), 38 | PhoneNumberConfirmed = table.Column(nullable: false), 39 | TwoFactorEnabled = table.Column(nullable: false), 40 | LockoutEnd = table.Column(nullable: true), 41 | LockoutEnabled = table.Column(nullable: false), 42 | AccessFailedCount = table.Column(nullable: false) 43 | }, 44 | constraints: table => 45 | { 46 | table.PrimaryKey("PK_AspNetUsers", x => x.Id); 47 | }); 48 | 49 | migrationBuilder.CreateTable( 50 | name: "AspNetRoleClaims", 51 | columns: table => new 52 | { 53 | Id = table.Column(nullable: false) 54 | .Annotation("SqlServer:Identity", "1, 1"), 55 | RoleId = table.Column(nullable: false), 56 | ClaimType = table.Column(nullable: true), 57 | ClaimValue = table.Column(nullable: true) 58 | }, 59 | constraints: table => 60 | { 61 | table.PrimaryKey("PK_AspNetRoleClaims", x => x.Id); 62 | table.ForeignKey( 63 | name: "FK_AspNetRoleClaims_AspNetRoles_RoleId", 64 | column: x => x.RoleId, 65 | principalTable: "AspNetRoles", 66 | principalColumn: "Id", 67 | onDelete: ReferentialAction.Cascade); 68 | }); 69 | 70 | migrationBuilder.CreateTable( 71 | name: "AspNetUserClaims", 72 | columns: table => new 73 | { 74 | Id = table.Column(nullable: false) 75 | .Annotation("SqlServer:Identity", "1, 1"), 76 | UserId = table.Column(nullable: false), 77 | ClaimType = table.Column(nullable: true), 78 | ClaimValue = table.Column(nullable: true) 79 | }, 80 | constraints: table => 81 | { 82 | table.PrimaryKey("PK_AspNetUserClaims", x => x.Id); 83 | table.ForeignKey( 84 | name: "FK_AspNetUserClaims_AspNetUsers_UserId", 85 | column: x => x.UserId, 86 | principalTable: "AspNetUsers", 87 | principalColumn: "Id", 88 | onDelete: ReferentialAction.Cascade); 89 | }); 90 | 91 | migrationBuilder.CreateTable( 92 | name: "AspNetUserLogins", 93 | columns: table => new 94 | { 95 | LoginProvider = table.Column(maxLength: 128, nullable: false), 96 | ProviderKey = table.Column(maxLength: 128, nullable: false), 97 | ProviderDisplayName = table.Column(nullable: true), 98 | UserId = table.Column(nullable: false) 99 | }, 100 | constraints: table => 101 | { 102 | table.PrimaryKey("PK_AspNetUserLogins", x => new { x.LoginProvider, x.ProviderKey }); 103 | table.ForeignKey( 104 | name: "FK_AspNetUserLogins_AspNetUsers_UserId", 105 | column: x => x.UserId, 106 | principalTable: "AspNetUsers", 107 | principalColumn: "Id", 108 | onDelete: ReferentialAction.Cascade); 109 | }); 110 | 111 | migrationBuilder.CreateTable( 112 | name: "AspNetUserRoles", 113 | columns: table => new 114 | { 115 | UserId = table.Column(nullable: false), 116 | RoleId = table.Column(nullable: false) 117 | }, 118 | constraints: table => 119 | { 120 | table.PrimaryKey("PK_AspNetUserRoles", x => new { x.UserId, x.RoleId }); 121 | table.ForeignKey( 122 | name: "FK_AspNetUserRoles_AspNetRoles_RoleId", 123 | column: x => x.RoleId, 124 | principalTable: "AspNetRoles", 125 | principalColumn: "Id", 126 | onDelete: ReferentialAction.Cascade); 127 | table.ForeignKey( 128 | name: "FK_AspNetUserRoles_AspNetUsers_UserId", 129 | column: x => x.UserId, 130 | principalTable: "AspNetUsers", 131 | principalColumn: "Id", 132 | onDelete: ReferentialAction.Cascade); 133 | }); 134 | 135 | migrationBuilder.CreateTable( 136 | name: "AspNetUserTokens", 137 | columns: table => new 138 | { 139 | UserId = table.Column(nullable: false), 140 | LoginProvider = table.Column(maxLength: 128, nullable: false), 141 | Name = table.Column(maxLength: 128, nullable: false), 142 | Value = table.Column(nullable: true) 143 | }, 144 | constraints: table => 145 | { 146 | table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); 147 | table.ForeignKey( 148 | name: "FK_AspNetUserTokens_AspNetUsers_UserId", 149 | column: x => x.UserId, 150 | principalTable: "AspNetUsers", 151 | principalColumn: "Id", 152 | onDelete: ReferentialAction.Cascade); 153 | }); 154 | 155 | migrationBuilder.CreateIndex( 156 | name: "IX_AspNetRoleClaims_RoleId", 157 | table: "AspNetRoleClaims", 158 | column: "RoleId"); 159 | 160 | migrationBuilder.CreateIndex( 161 | name: "RoleNameIndex", 162 | table: "AspNetRoles", 163 | column: "NormalizedName", 164 | unique: true, 165 | filter: "[NormalizedName] IS NOT NULL"); 166 | 167 | migrationBuilder.CreateIndex( 168 | name: "IX_AspNetUserClaims_UserId", 169 | table: "AspNetUserClaims", 170 | column: "UserId"); 171 | 172 | migrationBuilder.CreateIndex( 173 | name: "IX_AspNetUserLogins_UserId", 174 | table: "AspNetUserLogins", 175 | column: "UserId"); 176 | 177 | migrationBuilder.CreateIndex( 178 | name: "IX_AspNetUserRoles_RoleId", 179 | table: "AspNetUserRoles", 180 | column: "RoleId"); 181 | 182 | migrationBuilder.CreateIndex( 183 | name: "EmailIndex", 184 | table: "AspNetUsers", 185 | column: "NormalizedEmail"); 186 | 187 | migrationBuilder.CreateIndex( 188 | name: "UserNameIndex", 189 | table: "AspNetUsers", 190 | column: "NormalizedUserName", 191 | unique: true, 192 | filter: "[NormalizedUserName] IS NOT NULL"); 193 | } 194 | 195 | protected override void Down(MigrationBuilder migrationBuilder) 196 | { 197 | migrationBuilder.DropTable( 198 | name: "AspNetRoleClaims"); 199 | 200 | migrationBuilder.DropTable( 201 | name: "AspNetUserClaims"); 202 | 203 | migrationBuilder.DropTable( 204 | name: "AspNetUserLogins"); 205 | 206 | migrationBuilder.DropTable( 207 | name: "AspNetUserRoles"); 208 | 209 | migrationBuilder.DropTable( 210 | name: "AspNetUserTokens"); 211 | 212 | migrationBuilder.DropTable( 213 | name: "AspNetRoles"); 214 | 215 | migrationBuilder.DropTable( 216 | name: "AspNetUsers"); 217 | } 218 | } 219 | } 220 | -------------------------------------------------------------------------------- /SharedLib/Migrations/20191214180556_AddedCinematicItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.EntityFrameworkCore.Migrations; 3 | 4 | namespace SharedLib.Migrations 5 | { 6 | public partial class AddedCinematicItem : Migration 7 | { 8 | protected override void Up(MigrationBuilder migrationBuilder) 9 | { 10 | migrationBuilder.CreateTable( 11 | name: "CinematicItems", 12 | columns: table => new 13 | { 14 | Id = table.Column(nullable: false) 15 | .Annotation("SqlServer:Identity", "1, 1"), 16 | Name = table.Column(nullable: true), 17 | Description = table.Column(nullable: true), 18 | Phase = table.Column(nullable: false), 19 | ReleaseDate = table.Column(nullable: false) 20 | }, 21 | constraints: table => 22 | { 23 | table.PrimaryKey("PK_CinematicItems", x => x.Id); 24 | }); 25 | } 26 | 27 | protected override void Down(MigrationBuilder migrationBuilder) 28 | { 29 | migrationBuilder.DropTable( 30 | name: "CinematicItems"); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /SharedLib/Migrations/LibDbContextModelSnapshot.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using Microsoft.EntityFrameworkCore; 4 | using Microsoft.EntityFrameworkCore.Infrastructure; 5 | using Microsoft.EntityFrameworkCore.Metadata; 6 | using Microsoft.EntityFrameworkCore.Storage.ValueConversion; 7 | using SharedLib.Data; 8 | 9 | namespace SharedLib.Migrations 10 | { 11 | [DbContext(typeof(LibDbContext))] 12 | partial class LibDbContextModelSnapshot : ModelSnapshot 13 | { 14 | protected override void BuildModel(ModelBuilder modelBuilder) 15 | { 16 | #pragma warning disable 612, 618 17 | modelBuilder 18 | .HasAnnotation("ProductVersion", "3.1.0") 19 | .HasAnnotation("Relational:MaxIdentifierLength", 128) 20 | .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); 21 | 22 | modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => 23 | { 24 | b.Property("Id") 25 | .HasColumnType("nvarchar(450)"); 26 | 27 | b.Property("ConcurrencyStamp") 28 | .IsConcurrencyToken() 29 | .HasColumnType("nvarchar(max)"); 30 | 31 | b.Property("Name") 32 | .HasColumnType("nvarchar(256)") 33 | .HasMaxLength(256); 34 | 35 | b.Property("NormalizedName") 36 | .HasColumnType("nvarchar(256)") 37 | .HasMaxLength(256); 38 | 39 | b.HasKey("Id"); 40 | 41 | b.HasIndex("NormalizedName") 42 | .IsUnique() 43 | .HasName("RoleNameIndex") 44 | .HasFilter("[NormalizedName] IS NOT NULL"); 45 | 46 | b.ToTable("AspNetRoles"); 47 | }); 48 | 49 | modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => 50 | { 51 | b.Property("Id") 52 | .ValueGeneratedOnAdd() 53 | .HasColumnType("int") 54 | .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); 55 | 56 | b.Property("ClaimType") 57 | .HasColumnType("nvarchar(max)"); 58 | 59 | b.Property("ClaimValue") 60 | .HasColumnType("nvarchar(max)"); 61 | 62 | b.Property("RoleId") 63 | .IsRequired() 64 | .HasColumnType("nvarchar(450)"); 65 | 66 | b.HasKey("Id"); 67 | 68 | b.HasIndex("RoleId"); 69 | 70 | b.ToTable("AspNetRoleClaims"); 71 | }); 72 | 73 | modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b => 74 | { 75 | b.Property("Id") 76 | .HasColumnType("nvarchar(450)"); 77 | 78 | b.Property("AccessFailedCount") 79 | .HasColumnType("int"); 80 | 81 | b.Property("ConcurrencyStamp") 82 | .IsConcurrencyToken() 83 | .HasColumnType("nvarchar(max)"); 84 | 85 | b.Property("Email") 86 | .HasColumnType("nvarchar(256)") 87 | .HasMaxLength(256); 88 | 89 | b.Property("EmailConfirmed") 90 | .HasColumnType("bit"); 91 | 92 | b.Property("LockoutEnabled") 93 | .HasColumnType("bit"); 94 | 95 | b.Property("LockoutEnd") 96 | .HasColumnType("datetimeoffset"); 97 | 98 | b.Property("NormalizedEmail") 99 | .HasColumnType("nvarchar(256)") 100 | .HasMaxLength(256); 101 | 102 | b.Property("NormalizedUserName") 103 | .HasColumnType("nvarchar(256)") 104 | .HasMaxLength(256); 105 | 106 | b.Property("PasswordHash") 107 | .HasColumnType("nvarchar(max)"); 108 | 109 | b.Property("PhoneNumber") 110 | .HasColumnType("nvarchar(max)"); 111 | 112 | b.Property("PhoneNumberConfirmed") 113 | .HasColumnType("bit"); 114 | 115 | b.Property("SecurityStamp") 116 | .HasColumnType("nvarchar(max)"); 117 | 118 | b.Property("TwoFactorEnabled") 119 | .HasColumnType("bit"); 120 | 121 | b.Property("UserName") 122 | .HasColumnType("nvarchar(256)") 123 | .HasMaxLength(256); 124 | 125 | b.HasKey("Id"); 126 | 127 | b.HasIndex("NormalizedEmail") 128 | .HasName("EmailIndex"); 129 | 130 | b.HasIndex("NormalizedUserName") 131 | .IsUnique() 132 | .HasName("UserNameIndex") 133 | .HasFilter("[NormalizedUserName] IS NOT NULL"); 134 | 135 | b.ToTable("AspNetUsers"); 136 | }); 137 | 138 | modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => 139 | { 140 | b.Property("Id") 141 | .ValueGeneratedOnAdd() 142 | .HasColumnType("int") 143 | .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); 144 | 145 | b.Property("ClaimType") 146 | .HasColumnType("nvarchar(max)"); 147 | 148 | b.Property("ClaimValue") 149 | .HasColumnType("nvarchar(max)"); 150 | 151 | b.Property("UserId") 152 | .IsRequired() 153 | .HasColumnType("nvarchar(450)"); 154 | 155 | b.HasKey("Id"); 156 | 157 | b.HasIndex("UserId"); 158 | 159 | b.ToTable("AspNetUserClaims"); 160 | }); 161 | 162 | modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => 163 | { 164 | b.Property("LoginProvider") 165 | .HasColumnType("nvarchar(128)") 166 | .HasMaxLength(128); 167 | 168 | b.Property("ProviderKey") 169 | .HasColumnType("nvarchar(128)") 170 | .HasMaxLength(128); 171 | 172 | b.Property("ProviderDisplayName") 173 | .HasColumnType("nvarchar(max)"); 174 | 175 | b.Property("UserId") 176 | .IsRequired() 177 | .HasColumnType("nvarchar(450)"); 178 | 179 | b.HasKey("LoginProvider", "ProviderKey"); 180 | 181 | b.HasIndex("UserId"); 182 | 183 | b.ToTable("AspNetUserLogins"); 184 | }); 185 | 186 | modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => 187 | { 188 | b.Property("UserId") 189 | .HasColumnType("nvarchar(450)"); 190 | 191 | b.Property("RoleId") 192 | .HasColumnType("nvarchar(450)"); 193 | 194 | b.HasKey("UserId", "RoleId"); 195 | 196 | b.HasIndex("RoleId"); 197 | 198 | b.ToTable("AspNetUserRoles"); 199 | }); 200 | 201 | modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => 202 | { 203 | b.Property("UserId") 204 | .HasColumnType("nvarchar(450)"); 205 | 206 | b.Property("LoginProvider") 207 | .HasColumnType("nvarchar(128)") 208 | .HasMaxLength(128); 209 | 210 | b.Property("Name") 211 | .HasColumnType("nvarchar(128)") 212 | .HasMaxLength(128); 213 | 214 | b.Property("Value") 215 | .HasColumnType("nvarchar(max)"); 216 | 217 | b.HasKey("UserId", "LoginProvider", "Name"); 218 | 219 | b.ToTable("AspNetUserTokens"); 220 | }); 221 | 222 | modelBuilder.Entity("SharedLib.Models.CinematicItem", b => 223 | { 224 | b.Property("Id") 225 | .ValueGeneratedOnAdd() 226 | .HasColumnType("int") 227 | .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); 228 | 229 | b.Property("Description") 230 | .HasColumnType("nvarchar(max)"); 231 | 232 | b.Property("Name") 233 | .HasColumnType("nvarchar(max)"); 234 | 235 | b.Property("Phase") 236 | .HasColumnType("int"); 237 | 238 | b.Property("ReleaseDate") 239 | .HasColumnType("datetime2"); 240 | 241 | b.HasKey("Id"); 242 | 243 | b.ToTable("CinematicItems"); 244 | }); 245 | 246 | modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => 247 | { 248 | b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) 249 | .WithMany() 250 | .HasForeignKey("RoleId") 251 | .OnDelete(DeleteBehavior.Cascade) 252 | .IsRequired(); 253 | }); 254 | 255 | modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => 256 | { 257 | b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) 258 | .WithMany() 259 | .HasForeignKey("UserId") 260 | .OnDelete(DeleteBehavior.Cascade) 261 | .IsRequired(); 262 | }); 263 | 264 | modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => 265 | { 266 | b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) 267 | .WithMany() 268 | .HasForeignKey("UserId") 269 | .OnDelete(DeleteBehavior.Cascade) 270 | .IsRequired(); 271 | }); 272 | 273 | modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => 274 | { 275 | b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) 276 | .WithMany() 277 | .HasForeignKey("RoleId") 278 | .OnDelete(DeleteBehavior.Cascade) 279 | .IsRequired(); 280 | 281 | b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) 282 | .WithMany() 283 | .HasForeignKey("UserId") 284 | .OnDelete(DeleteBehavior.Cascade) 285 | .IsRequired(); 286 | }); 287 | 288 | modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => 289 | { 290 | b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) 291 | .WithMany() 292 | .HasForeignKey("UserId") 293 | .OnDelete(DeleteBehavior.Cascade) 294 | .IsRequired(); 295 | }); 296 | #pragma warning restore 612, 618 297 | } 298 | } 299 | } 300 | -------------------------------------------------------------------------------- /SharedLib/Models/CinematicItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace SharedLib.Models 6 | { 7 | public class CinematicItem 8 | { 9 | public int Id { get; set; } 10 | 11 | public string Name { get; set; } 12 | 13 | public string Description { get; set; } 14 | 15 | public int Phase { get; set; } 16 | 17 | public DateTime ReleaseDate { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /SharedLib/Services/CinematicItemService.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | using SharedLib.Data; 3 | using SharedLib.Models; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace SharedLib.Services 10 | { 11 | public class CinematicItemService : ICinematicItemService 12 | { 13 | private readonly LibDbContext _context; 14 | 15 | public CinematicItemService(LibDbContext context) 16 | { 17 | _context = context; 18 | } 19 | 20 | public async Task Add(CinematicItem cinematicItem) 21 | { 22 | _context.CinematicItems.Add(cinematicItem); 23 | await _context.SaveChangesAsync(); 24 | return cinematicItem; 25 | } 26 | 27 | public async Task Delete(int id) 28 | { 29 | var cinematicItem = await _context.CinematicItems.FindAsync(id); 30 | _context.CinematicItems.Remove(cinematicItem); 31 | await _context.SaveChangesAsync(); 32 | return cinematicItem; 33 | } 34 | 35 | public async Task> Get() 36 | { 37 | return await _context.CinematicItems.ToListAsync(); 38 | } 39 | 40 | public async Task Get(int id) 41 | { 42 | var toDo = await _context.CinematicItems.FindAsync(id); 43 | return toDo; 44 | } 45 | 46 | public async Task Update(CinematicItem cinematicItem) 47 | { 48 | _context.Entry(cinematicItem).State = EntityState.Modified; 49 | await _context.SaveChangesAsync(); 50 | return cinematicItem; 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /SharedLib/Services/ICinematicItemService.cs: -------------------------------------------------------------------------------- 1 | using SharedLib.Models; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace SharedLib.Services 8 | { 9 | public interface ICinematicItemService 10 | { 11 | Task> Get(); 12 | Task Get(int id); 13 | Task Add(CinematicItem cinematicItem); 14 | Task Update(CinematicItem cinematicItem); 15 | Task Delete(int id); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SharedLib/SharedLib.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /WebAppBlazor/App.razor: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |

Sorry, there's nothing at this address.

9 |
10 |
11 |
12 |
13 | -------------------------------------------------------------------------------- /WebAppBlazor/Areas/Identity/Pages/Account/LogOut.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @using Microsoft.AspNetCore.Identity 3 | @attribute [IgnoreAntiforgeryToken] 4 | @inject SignInManager SignInManager 5 | @functions { 6 | public async Task OnPost() 7 | { 8 | if (SignInManager.IsSignedIn(User)) 9 | { 10 | await SignInManager.SignOutAsync(); 11 | } 12 | 13 | return Redirect("~/"); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /WebAppBlazor/Areas/Identity/Pages/Shared/_LoginPartial.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Identity 2 | @inject SignInManager SignInManager 3 | @inject UserManager UserManager 4 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 5 | 6 | 28 | -------------------------------------------------------------------------------- /WebAppBlazor/Areas/Identity/RevalidatingIdentityAuthenticationStateProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Security.Claims; 3 | using System.Threading; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Components; 6 | using Microsoft.AspNetCore.Components.Authorization; 7 | using Microsoft.AspNetCore.Components.Server; 8 | using Microsoft.AspNetCore.Identity; 9 | using Microsoft.Extensions.DependencyInjection; 10 | using Microsoft.Extensions.Logging; 11 | using Microsoft.Extensions.Options; 12 | 13 | namespace WebAppBlazor.Areas.Identity 14 | { 15 | public class RevalidatingIdentityAuthenticationStateProvider 16 | : RevalidatingServerAuthenticationStateProvider where TUser : class 17 | { 18 | private readonly IServiceScopeFactory _scopeFactory; 19 | private readonly IdentityOptions _options; 20 | 21 | public RevalidatingIdentityAuthenticationStateProvider( 22 | ILoggerFactory loggerFactory, 23 | IServiceScopeFactory scopeFactory, 24 | IOptions optionsAccessor) 25 | : base(loggerFactory) 26 | { 27 | _scopeFactory = scopeFactory; 28 | _options = optionsAccessor.Value; 29 | } 30 | 31 | protected override TimeSpan RevalidationInterval => TimeSpan.FromMinutes(30); 32 | 33 | protected override async Task ValidateAuthenticationStateAsync( 34 | AuthenticationState authenticationState, CancellationToken cancellationToken) 35 | { 36 | // Get the user manager from a new scope to ensure it fetches fresh data 37 | var scope = _scopeFactory.CreateScope(); 38 | try 39 | { 40 | var userManager = scope.ServiceProvider.GetRequiredService>(); 41 | return await ValidateSecurityStampAsync(userManager, authenticationState.User); 42 | } 43 | finally 44 | { 45 | if (scope is IAsyncDisposable asyncDisposable) 46 | { 47 | await asyncDisposable.DisposeAsync(); 48 | } 49 | else 50 | { 51 | scope.Dispose(); 52 | } 53 | } 54 | } 55 | 56 | private async Task ValidateSecurityStampAsync(UserManager userManager, ClaimsPrincipal principal) 57 | { 58 | var user = await userManager.GetUserAsync(principal); 59 | if (user == null) 60 | { 61 | return false; 62 | } 63 | else if (!userManager.SupportsUserSecurityStamp) 64 | { 65 | return true; 66 | } 67 | else 68 | { 69 | var principalStamp = principal.FindFirstValue(_options.ClaimsIdentity.SecurityStampClaimType); 70 | var userStamp = await userManager.GetSecurityStampAsync(user); 71 | return principalStamp == userStamp; 72 | } 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /WebAppBlazor/Data/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace WebAppBlazor.Data 4 | { 5 | public class WeatherForecast 6 | { 7 | public DateTime Date { get; set; } 8 | 9 | public int TemperatureC { get; set; } 10 | 11 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 12 | 13 | public string Summary { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /WebAppBlazor/Data/WeatherForecastService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Threading.Tasks; 4 | 5 | namespace WebAppBlazor.Data 6 | { 7 | public class WeatherForecastService 8 | { 9 | private static readonly string[] Summaries = new[] 10 | { 11 | "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" 12 | }; 13 | 14 | public Task GetForecastAsync(DateTime startDate) 15 | { 16 | var rng = new Random(); 17 | return Task.FromResult(Enumerable.Range(1, 5).Select(index => new WeatherForecast 18 | { 19 | Date = startDate.AddDays(index), 20 | TemperatureC = rng.Next(-20, 55), 21 | Summary = Summaries[rng.Next(Summaries.Length)] 22 | }).ToArray()); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /WebAppBlazor/Pages/CinematicDetail.razor: -------------------------------------------------------------------------------- 1 | @page "/cinematicdetail" 2 | 3 | @using SharedLib.Data 4 | @using SharedLib.Models 5 | @using SharedLib.Services 6 | @inject ICinematicItemService service 7 | @inject IJSRuntime jsRuntime 8 | 9 | 10 | 11 | 46 | 47 | @code { 48 | [Parameter] 49 | public CinematicItem CinematicItemObject { get; set; } 50 | 51 | [Parameter] 52 | public Action DataChanged { get; set; } 53 | 54 | [Parameter] 55 | public RenderFragment CustomHeader { get; set; } 56 | 57 | private async Task CloseTaskModal() 58 | { 59 | await jsRuntime.InvokeAsync("CloseModal", "taskModal"); 60 | } 61 | 62 | private async void HandleValidSubmit() 63 | { 64 | if (CinematicItemObject.Id == 0) 65 | { 66 | await service.Add(CinematicItemObject); 67 | } 68 | else 69 | { 70 | await service.Update(CinematicItemObject); 71 | } 72 | await CloseTaskModal(); 73 | DataChanged?.Invoke(); 74 | } 75 | } -------------------------------------------------------------------------------- /WebAppBlazor/Pages/CinematicItems.razor: -------------------------------------------------------------------------------- 1 | @page "/cinematicitems" 2 | 3 | @using SharedLib.Data 4 | @using SharedLib.Models 5 | @using SharedLib.Services 6 | @inject ICinematicItemService service 7 | @inject IJSRuntime jsRuntime 8 | 9 |

Cinematic Items

10 | 11 |

This is a list of Cinematic Items!

12 | 13 | @if (cinematicItems == null) 14 | { 15 |

Loading...

16 | } 17 | else 18 | { 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | @foreach (var cinematicItem in cinematicItems) 31 | { 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | } 41 | 42 |
NameRelease DatePhaseEditDelete
@cinematicItem.Name@cinematicItem.ReleaseDate@cinematicItem.Phase
43 | } 44 |
45 | 46 |
47 | 48 | 49 | 51 | @customHeader 52 | 53 | 54 | @code { 55 | List cinematicItems; 56 | CinematicItem cinematicItemObject = new CinematicItem(); 57 | string customHeader = string.Empty; 58 | 59 | protected override async Task OnInitializedAsync() 60 | { 61 | cinematicItems = await service.Get(); 62 | } 63 | private void InitializeCinematicItemObject() 64 | { 65 | cinematicItemObject = new CinematicItem(); 66 | customHeader = "Add New Item"; 67 | } 68 | 69 | private async void DataChanged() 70 | { 71 | cinematicItems = await service.Get(); 72 | StateHasChanged(); 73 | } 74 | private void PrepareForEdit(CinematicItem cinematicItem) 75 | { 76 | customHeader = "Edit Item"; 77 | cinematicItemObject = cinematicItem; 78 | } 79 | 80 | private void PrepareForDelete(CinematicItem cinematicItem) 81 | { 82 | cinematicItemObject = cinematicItem; 83 | } 84 | 85 | private async Task Delete() 86 | { 87 | var task = await service.Delete(cinematicItemObject.Id); 88 | await jsRuntime.InvokeAsync("CloseModal", "confirmDeleteModal"); 89 | cinematicItems = await service.Get(); 90 | cinematicItemObject = new CinematicItem(); 91 | } 92 | } -------------------------------------------------------------------------------- /WebAppBlazor/Pages/Counter.razor: -------------------------------------------------------------------------------- 1 | @page "/counter" 2 | 3 |

Counter

4 | 5 |

Current count: @currentCount

6 | 7 | 8 | 9 | @code { 10 | private int currentCount = 0; 11 | 12 | private void IncrementCount() 13 | { 14 | currentCount++; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /WebAppBlazor/Pages/Error.razor: -------------------------------------------------------------------------------- 1 | @page "/error" 2 | 3 | 4 |

Error.

5 |

An error occurred while processing your request.

6 | 7 |

Development Mode

8 |

9 | Swapping to Development environment will display more detailed information about the error that occurred. 10 |

11 |

12 | The Development environment shouldn't be enabled for deployed applications. 13 | It can result in displaying sensitive information from exceptions to end users. 14 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 15 | and restarting the app. 16 |

-------------------------------------------------------------------------------- /WebAppBlazor/Pages/FetchData.razor: -------------------------------------------------------------------------------- 1 | @page "/fetchdata" 2 | 3 | @using WebAppBlazor.Data 4 | @inject WeatherForecastService ForecastService 5 | 6 |

Weather forecast

7 | 8 |

This component demonstrates fetching data from a service.

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

Loading...

13 | } 14 | else 15 | { 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | @foreach (var forecast in forecasts) 27 | { 28 | 29 | 30 | 31 | 32 | 33 | 34 | } 35 | 36 |
DateTemp. (C)Temp. (F)Summary
@forecast.Date.ToShortDateString()@forecast.TemperatureC@forecast.TemperatureF@forecast.Summary
37 | } 38 | 39 | @code { 40 | private WeatherForecast[] forecasts; 41 | 42 | protected override async Task OnInitializedAsync() 43 | { 44 | forecasts = await ForecastService.GetForecastAsync(DateTime.Now); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /WebAppBlazor/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 |

Hello, world!

4 | 5 | Welcome to your new app. 6 | -------------------------------------------------------------------------------- /WebAppBlazor/Pages/_Host.cshtml: -------------------------------------------------------------------------------- 1 | @page "/" 2 | @namespace WebAppBlazor.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | @{ 5 | Layout = null; 6 | } 7 | 8 | 9 | 10 | 11 | 12 | 13 | WebAppBlazor 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | An error has occurred. This application may no longer respond until reloaded. 26 | 27 | 28 | An unhandled exception has occurred. See browser dev tools for details. 29 | 30 | Reload 31 | 🗙 32 |
33 | 34 | 35 | 36 | 37 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /WebAppBlazor/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.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Hosting; 10 | using Microsoft.Extensions.Logging; 11 | 12 | namespace WebAppBlazor 13 | { 14 | public class Program 15 | { 16 | public static void Main(string[] args) 17 | { 18 | CreateHostBuilder(args).Build().Run(); 19 | } 20 | 21 | public static IHostBuilder CreateHostBuilder(string[] args) => 22 | Host.CreateDefaultBuilder(args) 23 | .ConfigureWebHostDefaults(webBuilder => 24 | { 25 | webBuilder.UseStartup(); 26 | }); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /WebAppBlazor/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:61712", 7 | "sslPort": 44342 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "WebAppBlazor": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 22 | "environmentVariables": { 23 | "ASPNETCORE_ENVIRONMENT": "Development" 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /WebAppBlazor/Shared/ConfirmDialog.razor: -------------------------------------------------------------------------------- 1 |  20 | 21 | @code { 22 | [Parameter] 23 | public int Id { get; set; } 24 | 25 | [Parameter] 26 | public EventCallback OnClick { get; set; } 27 | } -------------------------------------------------------------------------------- /WebAppBlazor/Shared/LoginDisplay.razor: -------------------------------------------------------------------------------- 1 |  2 | 3 | Hello, @context.User.Identity.Name! 4 |
5 | 6 |
7 |
8 | 9 | Register 10 | Log in 11 | 12 |
13 | -------------------------------------------------------------------------------- /WebAppBlazor/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | 6 | 7 |
8 |
9 | 10 | About 11 |
12 | 13 |
14 | @Body 15 |
16 |
17 | -------------------------------------------------------------------------------- /WebAppBlazor/Shared/NavMenu.razor: -------------------------------------------------------------------------------- 1 |  7 | 8 |
9 | 26 |
27 | 28 | @code { 29 | private bool collapseNavMenu = true; 30 | 31 | private string NavMenuCssClass => collapseNavMenu ? "collapse" : null; 32 | 33 | private void ToggleNavMenu() 34 | { 35 | collapseNavMenu = !collapseNavMenu; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /WebAppBlazor/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.Components; 7 | using Microsoft.AspNetCore.Components.Authorization; 8 | using Microsoft.AspNetCore.Identity; 9 | using Microsoft.AspNetCore.Identity.UI; 10 | using Microsoft.AspNetCore.Hosting; 11 | using Microsoft.AspNetCore.HttpsPolicy; 12 | using Microsoft.EntityFrameworkCore; 13 | using Microsoft.Extensions.Configuration; 14 | using Microsoft.Extensions.DependencyInjection; 15 | using Microsoft.Extensions.Hosting; 16 | using WebAppBlazor.Areas.Identity; 17 | using WebAppBlazor.Data; 18 | using SharedLib.Data; 19 | using SharedLib.Services; 20 | 21 | namespace WebAppBlazor 22 | { 23 | public class Startup 24 | { 25 | public Startup(IConfiguration configuration) 26 | { 27 | Configuration = configuration; 28 | } 29 | 30 | public IConfiguration Configuration { get; } 31 | 32 | // This method gets called by the runtime. Use this method to add services to the container. 33 | // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 34 | public void ConfigureServices(IServiceCollection services) 35 | { 36 | services.AddDbContext(options => 37 | { 38 | options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection"), 39 | assembly => assembly.MigrationsAssembly(typeof(LibDbContext).Assembly.FullName)); 40 | }); 41 | services.AddDefaultIdentity(options => options.SignIn.RequireConfirmedAccount = true) 42 | .AddEntityFrameworkStores(); 43 | services.AddRazorPages(); 44 | services.AddServerSideBlazor(); 45 | services.AddScoped>(); 46 | services.AddSingleton(); 47 | 48 | services.AddTransient(); 49 | 50 | } 51 | 52 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. 53 | public void Configure(IApplicationBuilder app, IWebHostEnvironment env) 54 | { 55 | if (env.IsDevelopment()) 56 | { 57 | app.UseDeveloperExceptionPage(); 58 | app.UseDatabaseErrorPage(); 59 | } 60 | else 61 | { 62 | app.UseExceptionHandler("/Error"); 63 | // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. 64 | app.UseHsts(); 65 | } 66 | 67 | app.UseHttpsRedirection(); 68 | app.UseStaticFiles(); 69 | 70 | app.UseRouting(); 71 | 72 | app.UseAuthentication(); 73 | app.UseAuthorization(); 74 | 75 | app.UseEndpoints(endpoints => 76 | { 77 | endpoints.MapControllers(); 78 | endpoints.MapBlazorHub(); 79 | endpoints.MapFallbackToPage("/_Host"); 80 | }); 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /WebAppBlazor/WebAppBlazor.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | aspnet-WebAppBlazor-5C1C0B7F-545E-47DA-83B4-06A7E80185D7 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /WebAppBlazor/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using Microsoft.AspNetCore.Authorization 3 | @using Microsoft.AspNetCore.Components.Authorization 4 | @using Microsoft.AspNetCore.Components.Forms 5 | @using Microsoft.AspNetCore.Components.Routing 6 | @using Microsoft.AspNetCore.Components.Web 7 | @using Microsoft.JSInterop 8 | @using WebAppBlazor 9 | @using WebAppBlazor.Shared 10 | -------------------------------------------------------------------------------- /WebAppBlazor/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "DetailedErrors": true, 3 | "Logging": { 4 | "LogLevel": { 5 | "Default": "Information", 6 | "Microsoft": "Warning", 7 | "Microsoft.Hosting.Lifetime": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /WebAppBlazor/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConnectionStrings": { 3 | "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=aspnet-WebAppMvc-DBB721AE-DAF5-4CEE-969F-07CEACDCD7AE;Trusted_Connection=True;MultipleActiveResultSets=true" 4 | }, 5 | "Logging": { 6 | "LogLevel": { 7 | "Default": "Information", 8 | "Microsoft": "Warning", 9 | "Microsoft.Hosting.Lifetime": "Information" 10 | } 11 | }, 12 | "AllowedHosts": "*" 13 | } 14 | -------------------------------------------------------------------------------- /WebAppBlazor/libman.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "defaultProvider": "unpkg", 4 | "libraries": [ 5 | { 6 | "library": "jquery@3.4.1", 7 | "destination": "wwwroot/lib/jquery/", 8 | "files": [ 9 | "dist/jquery.min.js" 10 | ] 11 | }, 12 | { 13 | "library": "bootstrap@4.4.1", 14 | "destination": "wwwroot/lib/bootstrap/", 15 | "files": [ 16 | "dist/js/bootstrap.min.js" 17 | ] 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /WebAppBlazor/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 | -------------------------------------------------------------------------------- /WebAppBlazor/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. -------------------------------------------------------------------------------- /WebAppBlazor/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 | -------------------------------------------------------------------------------- /WebAppBlazor/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'} -------------------------------------------------------------------------------- /WebAppBlazor/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WebAppsWithSharedLib/fd38eb29e4e114f8125848e87191172587f280c9/WebAppBlazor/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /WebAppBlazor/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WebAppsWithSharedLib/fd38eb29e4e114f8125848e87191172587f280c9/WebAppBlazor/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /WebAppBlazor/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WebAppsWithSharedLib/fd38eb29e4e114f8125848e87191172587f280c9/WebAppBlazor/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /WebAppBlazor/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WebAppsWithSharedLib/fd38eb29e4e114f8125848e87191172587f280c9/WebAppBlazor/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /WebAppBlazor/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 | a, .btn-link { 8 | color: #0366d6; 9 | } 10 | 11 | .btn-primary { 12 | color: #fff; 13 | background-color: #1b6ec2; 14 | border-color: #1861ac; 15 | } 16 | 17 | app { 18 | position: relative; 19 | display: flex; 20 | flex-direction: column; 21 | } 22 | 23 | .top-row { 24 | height: 3.5rem; 25 | display: flex; 26 | align-items: center; 27 | } 28 | 29 | .main { 30 | flex: 1; 31 | } 32 | 33 | .main .top-row { 34 | background-color: #f7f7f7; 35 | border-bottom: 1px solid #d6d5d5; 36 | justify-content: flex-end; 37 | } 38 | 39 | .main .top-row > a, .main .top-row .btn-link { 40 | white-space: nowrap; 41 | margin-left: 1.5rem; 42 | } 43 | 44 | .main .top-row a:first-child { 45 | overflow: hidden; 46 | text-overflow: ellipsis; 47 | } 48 | 49 | .sidebar { 50 | background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%); 51 | } 52 | 53 | .sidebar .top-row { 54 | background-color: rgba(0,0,0,0.4); 55 | } 56 | 57 | .sidebar .navbar-brand { 58 | font-size: 1.1rem; 59 | } 60 | 61 | .sidebar .oi { 62 | width: 2rem; 63 | font-size: 1.1rem; 64 | vertical-align: text-top; 65 | top: -2px; 66 | } 67 | 68 | .sidebar .nav-item { 69 | font-size: 0.9rem; 70 | padding-bottom: 0.5rem; 71 | } 72 | 73 | .sidebar .nav-item:first-of-type { 74 | padding-top: 1rem; 75 | } 76 | 77 | .sidebar .nav-item:last-of-type { 78 | padding-bottom: 1rem; 79 | } 80 | 81 | .sidebar .nav-item a { 82 | color: #d7d7d7; 83 | border-radius: 4px; 84 | height: 3rem; 85 | display: flex; 86 | align-items: center; 87 | line-height: 3rem; 88 | } 89 | 90 | .sidebar .nav-item a.active { 91 | background-color: rgba(255,255,255,0.25); 92 | color: white; 93 | } 94 | 95 | .sidebar .nav-item a:hover { 96 | background-color: rgba(255,255,255,0.1); 97 | color: white; 98 | } 99 | 100 | .content { 101 | padding-top: 1.1rem; 102 | } 103 | 104 | .navbar-toggler { 105 | background-color: rgba(255, 255, 255, 0.1); 106 | } 107 | 108 | .valid.modified:not([type=checkbox]) { 109 | outline: 1px solid #26b050; 110 | } 111 | 112 | .invalid { 113 | outline: 1px solid red; 114 | } 115 | 116 | .validation-message { 117 | color: red; 118 | } 119 | 120 | #blazor-error-ui { 121 | background: lightyellow; 122 | bottom: 0; 123 | box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); 124 | display: none; 125 | left: 0; 126 | padding: 0.6rem 1.25rem 0.7rem 1.25rem; 127 | position: fixed; 128 | width: 100%; 129 | z-index: 1000; 130 | } 131 | 132 | #blazor-error-ui .dismiss { 133 | cursor: pointer; 134 | position: absolute; 135 | right: 0.75rem; 136 | top: 0.5rem; 137 | } 138 | 139 | @media (max-width: 767.98px) { 140 | .main .top-row:not(.auth) { 141 | display: none; 142 | } 143 | 144 | .main .top-row.auth { 145 | justify-content: space-between; 146 | } 147 | 148 | .main .top-row a, .main .top-row .btn-link { 149 | margin-left: 0; 150 | } 151 | } 152 | 153 | @media (min-width: 768px) { 154 | app { 155 | flex-direction: row; 156 | } 157 | 158 | .sidebar { 159 | width: 250px; 160 | height: 100vh; 161 | position: sticky; 162 | top: 0; 163 | } 164 | 165 | .main .top-row { 166 | position: sticky; 167 | top: 0; 168 | } 169 | 170 | .main > div { 171 | padding-left: 2rem !important; 172 | padding-right: 1.5rem !important; 173 | } 174 | 175 | .navbar-toggler { 176 | display: none; 177 | } 178 | 179 | .sidebar .collapse { 180 | /* Never collapse the sidebar for wide screens */ 181 | display: block; 182 | } 183 | } 184 | -------------------------------------------------------------------------------- /WebAppBlazor/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WebAppsWithSharedLib/fd38eb29e4e114f8125848e87191172587f280c9/WebAppBlazor/wwwroot/favicon.ico -------------------------------------------------------------------------------- /WebAppMvc/Areas/Identity/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "/Views/Shared/_Layout.cshtml"; 3 | } 4 | -------------------------------------------------------------------------------- /WebAppMvc/Controllers/CinematicItemsController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.Rendering; 7 | using Microsoft.EntityFrameworkCore; 8 | using SharedLib.Data; 9 | using SharedLib.Models; 10 | 11 | namespace WebAppMvc.Controllers 12 | { 13 | public class CinematicItemsController : Controller 14 | { 15 | private readonly LibDbContext _context; 16 | 17 | public CinematicItemsController(LibDbContext context) 18 | { 19 | _context = context; 20 | } 21 | 22 | // GET: CinematicItems 23 | public async Task Index() 24 | { 25 | return View(await _context.CinematicItems.ToListAsync()); 26 | } 27 | 28 | // GET: CinematicItems/Details/5 29 | public async Task Details(int? id) 30 | { 31 | if (id == null) 32 | { 33 | return NotFound(); 34 | } 35 | 36 | var cinematicItem = await _context.CinematicItems 37 | .FirstOrDefaultAsync(m => m.Id == id); 38 | if (cinematicItem == null) 39 | { 40 | return NotFound(); 41 | } 42 | 43 | return View(cinematicItem); 44 | } 45 | 46 | // GET: CinematicItems/Create 47 | public IActionResult Create() 48 | { 49 | return View(); 50 | } 51 | 52 | // POST: CinematicItems/Create 53 | // To protect from overposting attacks, please enable the specific properties you want to bind to, for 54 | // more details see http://go.microsoft.com/fwlink/?LinkId=317598. 55 | [HttpPost] 56 | [ValidateAntiForgeryToken] 57 | public async Task Create([Bind("Id,Name,Description,Phase,ReleaseDate")] CinematicItem cinematicItem) 58 | { 59 | if (ModelState.IsValid) 60 | { 61 | _context.Add(cinematicItem); 62 | await _context.SaveChangesAsync(); 63 | return RedirectToAction(nameof(Index)); 64 | } 65 | return View(cinematicItem); 66 | } 67 | 68 | // GET: CinematicItems/Edit/5 69 | public async Task Edit(int? id) 70 | { 71 | if (id == null) 72 | { 73 | return NotFound(); 74 | } 75 | 76 | var cinematicItem = await _context.CinematicItems.FindAsync(id); 77 | if (cinematicItem == null) 78 | { 79 | return NotFound(); 80 | } 81 | return View(cinematicItem); 82 | } 83 | 84 | // POST: CinematicItems/Edit/5 85 | // To protect from overposting attacks, please enable the specific properties you want to bind to, for 86 | // more details see http://go.microsoft.com/fwlink/?LinkId=317598. 87 | [HttpPost] 88 | [ValidateAntiForgeryToken] 89 | public async Task Edit(int id, [Bind("Id,Name,Description,Phase,ReleaseDate")] CinematicItem cinematicItem) 90 | { 91 | if (id != cinematicItem.Id) 92 | { 93 | return NotFound(); 94 | } 95 | 96 | if (ModelState.IsValid) 97 | { 98 | try 99 | { 100 | _context.Update(cinematicItem); 101 | await _context.SaveChangesAsync(); 102 | } 103 | catch (DbUpdateConcurrencyException) 104 | { 105 | if (!CinematicItemExists(cinematicItem.Id)) 106 | { 107 | return NotFound(); 108 | } 109 | else 110 | { 111 | throw; 112 | } 113 | } 114 | return RedirectToAction(nameof(Index)); 115 | } 116 | return View(cinematicItem); 117 | } 118 | 119 | // GET: CinematicItems/Delete/5 120 | public async Task Delete(int? id) 121 | { 122 | if (id == null) 123 | { 124 | return NotFound(); 125 | } 126 | 127 | var cinematicItem = await _context.CinematicItems 128 | .FirstOrDefaultAsync(m => m.Id == id); 129 | if (cinematicItem == null) 130 | { 131 | return NotFound(); 132 | } 133 | 134 | return View(cinematicItem); 135 | } 136 | 137 | // POST: CinematicItems/Delete/5 138 | [HttpPost, ActionName("Delete")] 139 | [ValidateAntiForgeryToken] 140 | public async Task DeleteConfirmed(int id) 141 | { 142 | var cinematicItem = await _context.CinematicItems.FindAsync(id); 143 | _context.CinematicItems.Remove(cinematicItem); 144 | await _context.SaveChangesAsync(); 145 | return RedirectToAction(nameof(Index)); 146 | } 147 | 148 | private bool CinematicItemExists(int id) 149 | { 150 | return _context.CinematicItems.Any(e => e.Id == id); 151 | } 152 | } 153 | } 154 | -------------------------------------------------------------------------------- /WebAppMvc/Controllers/CinematicItemsUsingServiceController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | 7 | namespace WebAppMvc.Controllers 8 | { 9 | public class CinematicItemsUsingServiceController : Controller 10 | { 11 | public IActionResult Index() 12 | { 13 | return View(); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /WebAppMvc/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore.Mvc; 7 | using Microsoft.Extensions.Logging; 8 | using WebAppMvc.Models; 9 | 10 | namespace WebAppMvc.Controllers 11 | { 12 | public class HomeController : Controller 13 | { 14 | private readonly ILogger _logger; 15 | 16 | public HomeController(ILogger logger) 17 | { 18 | _logger = logger; 19 | } 20 | 21 | public IActionResult Index() 22 | { 23 | return View(); 24 | } 25 | 26 | public IActionResult Privacy() 27 | { 28 | return View(); 29 | } 30 | 31 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 32 | public IActionResult Error() 33 | { 34 | return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /WebAppMvc/Models/ErrorViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace WebAppMvc.Models 4 | { 5 | public class ErrorViewModel 6 | { 7 | public string RequestId { get; set; } 8 | 9 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /WebAppMvc/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Hosting; 6 | using Microsoft.Extensions.Configuration; 7 | using Microsoft.Extensions.Hosting; 8 | using Microsoft.Extensions.Logging; 9 | 10 | namespace WebAppMvc 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 | .ConfigureWebHostDefaults(webBuilder => 22 | { 23 | webBuilder.UseStartup(); 24 | }); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /WebAppMvc/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:61694", 7 | "sslPort": 44316 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "WebAppMvc": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 22 | "environmentVariables": { 23 | "ASPNETCORE_ENVIRONMENT": "Development" 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /WebAppMvc/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.Identity; 7 | using Microsoft.AspNetCore.Identity.UI; 8 | using Microsoft.AspNetCore.Hosting; 9 | using Microsoft.AspNetCore.HttpsPolicy; 10 | using Microsoft.EntityFrameworkCore; 11 | using Microsoft.Extensions.Configuration; 12 | using Microsoft.Extensions.DependencyInjection; 13 | using Microsoft.Extensions.Hosting; 14 | using SharedLib.Data; 15 | 16 | namespace WebAppMvc 17 | { 18 | public class Startup 19 | { 20 | public Startup(IConfiguration configuration) 21 | { 22 | Configuration = configuration; 23 | } 24 | 25 | public IConfiguration Configuration { get; } 26 | 27 | // This method gets called by the runtime. Use this method to add services to the container. 28 | public void ConfigureServices(IServiceCollection services) 29 | { 30 | services.AddDbContext(options => 31 | { 32 | options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection"), 33 | assembly => assembly.MigrationsAssembly(typeof(LibDbContext).Assembly.FullName)); 34 | }); 35 | services.AddDefaultIdentity(options => options.SignIn.RequireConfirmedAccount = true) 36 | .AddEntityFrameworkStores(); 37 | services.AddControllersWithViews(); 38 | services.AddRazorPages(); 39 | } 40 | 41 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. 42 | public void Configure(IApplicationBuilder app, IWebHostEnvironment env) 43 | { 44 | if (env.IsDevelopment()) 45 | { 46 | app.UseDeveloperExceptionPage(); 47 | app.UseDatabaseErrorPage(); 48 | } 49 | else 50 | { 51 | app.UseExceptionHandler("/Home/Error"); 52 | // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. 53 | app.UseHsts(); 54 | } 55 | app.UseHttpsRedirection(); 56 | app.UseStaticFiles(); 57 | 58 | app.UseRouting(); 59 | 60 | app.UseAuthentication(); 61 | app.UseAuthorization(); 62 | 63 | app.UseEndpoints(endpoints => 64 | { 65 | endpoints.MapControllerRoute( 66 | name: "default", 67 | pattern: "{controller=Home}/{action=Index}/{id?}"); 68 | endpoints.MapRazorPages(); 69 | }); 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /WebAppMvc/Views/CinematicItems/Create.cshtml: -------------------------------------------------------------------------------- 1 | @model SharedLib.Models.CinematicItem 2 | 3 | @{ 4 | ViewData["Title"] = "Create"; 5 | } 6 | 7 |

Create

8 | 9 |

CinematicItem

10 |
11 |
12 |
13 |
14 |
15 |
16 | 17 | 18 | 19 |
20 |
21 | 22 | 23 | 24 |
25 |
26 | 27 | 28 | 29 |
30 |
31 | 32 | 33 | 34 |
35 |
36 | 37 |
38 |
39 |
40 |
41 | 42 |
43 | Back to List 44 |
45 | 46 | @section Scripts { 47 | @{await Html.RenderPartialAsync("_ValidationScriptsPartial");} 48 | } 49 | -------------------------------------------------------------------------------- /WebAppMvc/Views/CinematicItems/Delete.cshtml: -------------------------------------------------------------------------------- 1 | @model SharedLib.Models.CinematicItem 2 | 3 | @{ 4 | ViewData["Title"] = "Delete"; 5 | } 6 | 7 |

Delete

8 | 9 |

Are you sure you want to delete this?

10 |
11 |

CinematicItem

12 |
13 |
14 |
15 | @Html.DisplayNameFor(model => model.Name) 16 |
17 |
18 | @Html.DisplayFor(model => model.Name) 19 |
20 |
21 | @Html.DisplayNameFor(model => model.Description) 22 |
23 |
24 | @Html.DisplayFor(model => model.Description) 25 |
26 |
27 | @Html.DisplayNameFor(model => model.Phase) 28 |
29 |
30 | @Html.DisplayFor(model => model.Phase) 31 |
32 |
33 | @Html.DisplayNameFor(model => model.ReleaseDate) 34 |
35 |
36 | @Html.DisplayFor(model => model.ReleaseDate) 37 |
38 |
39 | 40 |
41 | 42 | | 43 | Back to List 44 |
45 |
46 | -------------------------------------------------------------------------------- /WebAppMvc/Views/CinematicItems/Details.cshtml: -------------------------------------------------------------------------------- 1 | @model SharedLib.Models.CinematicItem 2 | 3 | @{ 4 | ViewData["Title"] = "Details"; 5 | } 6 | 7 |

Details

8 | 9 |
10 |

CinematicItem

11 |
12 |
13 |
14 | @Html.DisplayNameFor(model => model.Name) 15 |
16 |
17 | @Html.DisplayFor(model => model.Name) 18 |
19 |
20 | @Html.DisplayNameFor(model => model.Description) 21 |
22 |
23 | @Html.DisplayFor(model => model.Description) 24 |
25 |
26 | @Html.DisplayNameFor(model => model.Phase) 27 |
28 |
29 | @Html.DisplayFor(model => model.Phase) 30 |
31 |
32 | @Html.DisplayNameFor(model => model.ReleaseDate) 33 |
34 |
35 | @Html.DisplayFor(model => model.ReleaseDate) 36 |
37 |
38 |
39 |
40 | Edit | 41 | Back to List 42 |
43 | -------------------------------------------------------------------------------- /WebAppMvc/Views/CinematicItems/Edit.cshtml: -------------------------------------------------------------------------------- 1 | @model SharedLib.Models.CinematicItem 2 | 3 | @{ 4 | ViewData["Title"] = "Edit"; 5 | } 6 | 7 |

Edit

8 | 9 |

CinematicItem

10 |
11 |
12 |
13 |
14 |
15 | 16 |
17 | 18 | 19 | 20 |
21 |
22 | 23 | 24 | 25 |
26 |
27 | 28 | 29 | 30 |
31 |
32 | 33 | 34 | 35 |
36 |
37 | 38 |
39 |
40 |
41 |
42 | 43 |
44 | Back to List 45 |
46 | 47 | @section Scripts { 48 | @{await Html.RenderPartialAsync("_ValidationScriptsPartial");} 49 | } 50 | -------------------------------------------------------------------------------- /WebAppMvc/Views/CinematicItems/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | 3 | @{ 4 | ViewData["Title"] = "Index"; 5 | } 6 | 7 |

Index

8 | 9 |

10 | Create New 11 |

12 | 13 | 14 | 15 | 18 | 21 | 24 | 27 | 28 | 29 | 30 | 31 | @foreach (var item in Model) { 32 | 33 | 36 | 39 | 42 | 45 | 50 | 51 | } 52 | 53 |
16 | @Html.DisplayNameFor(model => model.Name) 17 | 19 | @Html.DisplayNameFor(model => model.Description) 20 | 22 | @Html.DisplayNameFor(model => model.Phase) 23 | 25 | @Html.DisplayNameFor(model => model.ReleaseDate) 26 |
34 | @Html.DisplayFor(modelItem => item.Name) 35 | 37 | @Html.DisplayFor(modelItem => item.Description) 38 | 40 | @Html.DisplayFor(modelItem => item.Phase) 41 | 43 | @Html.DisplayFor(modelItem => item.ReleaseDate) 44 | 46 | Edit | 47 | Details | 48 | Delete 49 |
54 | -------------------------------------------------------------------------------- /WebAppMvc/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Home Page"; 3 | } 4 | 5 |
6 |

Welcome

7 |

Learn about building Web apps with ASP.NET Core.

8 |
9 | -------------------------------------------------------------------------------- /WebAppMvc/Views/Home/Privacy.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Privacy Policy"; 3 | } 4 |

@ViewData["Title"]

5 | 6 |

Use this page to detail your site's privacy policy.

7 | -------------------------------------------------------------------------------- /WebAppMvc/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @model ErrorViewModel 2 | @{ 3 | ViewData["Title"] = "Error"; 4 | } 5 | 6 |

Error.

7 |

An error occurred while processing your request.

8 | 9 | @if (Model.ShowRequestId) 10 | { 11 |

12 | Request ID: @Model.RequestId 13 |

14 | } 15 | 16 |

Development Mode

17 |

18 | Swapping to Development environment will display more detailed information about the error that occurred. 19 |

20 |

21 | The Development environment shouldn't be enabled for deployed applications. 22 | It can result in displaying sensitive information from exceptions to end users. 23 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 24 | and restarting the app. 25 |

26 | -------------------------------------------------------------------------------- /WebAppMvc/Views/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | @ViewData["Title"] - WebAppMvc 7 | 8 | 9 | 10 | 11 |
12 | 32 |
33 |
34 |
35 | @RenderBody() 36 |
37 |
38 | 39 |
40 |
41 | © 2019 - WebAppMvc - Privacy 42 |
43 |
44 | 45 | 46 | 47 | @RenderSection("Scripts", required: false) 48 | 49 | 50 | -------------------------------------------------------------------------------- /WebAppMvc/Views/Shared/_LoginPartial.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Identity 2 | @inject SignInManager SignInManager 3 | @inject UserManager UserManager 4 | 5 | 27 | -------------------------------------------------------------------------------- /WebAppMvc/Views/Shared/_ValidationScriptsPartial.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | -------------------------------------------------------------------------------- /WebAppMvc/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using WebAppMvc 2 | @using WebAppMvc.Models 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /WebAppMvc/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /WebAppMvc/WebAppMvc.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | aspnet-WebAppMvc-DBB721AE-DAF5-4CEE-969F-07CEACDCD7AE 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /WebAppMvc/WebAppMvc.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29609.76 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebAppMvc", "WebAppMvc.csproj", "{2A769DE8-A4F7-4E34-B640-18E2DA6F4F35}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {2A769DE8-A4F7-4E34-B640-18E2DA6F4F35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {2A769DE8-A4F7-4E34-B640-18E2DA6F4F35}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {2A769DE8-A4F7-4E34-B640-18E2DA6F4F35}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {2A769DE8-A4F7-4E34-B640-18E2DA6F4F35}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {8A311C9B-0CF6-408D-8367-0C9EF2F6C83A} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /WebAppMvc/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /WebAppMvc/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConnectionStrings": { 3 | "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=aspnet-WebAppMvc-DBB721AE-DAF5-4CEE-969F-07CEACDCD7AE;Trusted_Connection=True;MultipleActiveResultSets=true" 4 | }, 5 | "Logging": { 6 | "LogLevel": { 7 | "Default": "Information", 8 | "Microsoft": "Warning", 9 | "Microsoft.Hosting.Lifetime": "Information" 10 | } 11 | }, 12 | "AllowedHosts": "*" 13 | } 14 | -------------------------------------------------------------------------------- /WebAppMvc/wwwroot/css/site.css: -------------------------------------------------------------------------------- 1 | /* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification 2 | for details on configuring this project to bundle and minify static web assets. */ 3 | 4 | a.navbar-brand { 5 | white-space: normal; 6 | text-align: center; 7 | word-break: break-all; 8 | } 9 | 10 | /* Provide sufficient contrast against white background */ 11 | a { 12 | color: #0366d6; 13 | } 14 | 15 | .btn-primary { 16 | color: #fff; 17 | background-color: #1b6ec2; 18 | border-color: #1861ac; 19 | } 20 | 21 | .nav-pills .nav-link.active, .nav-pills .show > .nav-link { 22 | color: #fff; 23 | background-color: #1b6ec2; 24 | border-color: #1861ac; 25 | } 26 | 27 | /* Sticky footer styles 28 | -------------------------------------------------- */ 29 | html { 30 | font-size: 14px; 31 | } 32 | @media (min-width: 768px) { 33 | html { 34 | font-size: 16px; 35 | } 36 | } 37 | 38 | .border-top { 39 | border-top: 1px solid #e5e5e5; 40 | } 41 | .border-bottom { 42 | border-bottom: 1px solid #e5e5e5; 43 | } 44 | 45 | .box-shadow { 46 | box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05); 47 | } 48 | 49 | button.accept-policy { 50 | font-size: 1rem; 51 | line-height: inherit; 52 | } 53 | 54 | /* Sticky footer styles 55 | -------------------------------------------------- */ 56 | html { 57 | position: relative; 58 | min-height: 100%; 59 | } 60 | 61 | body { 62 | /* Margin bottom by footer height */ 63 | margin-bottom: 60px; 64 | } 65 | .footer { 66 | position: absolute; 67 | bottom: 0; 68 | width: 100%; 69 | white-space: nowrap; 70 | line-height: 60px; /* Vertically center the text there */ 71 | } 72 | -------------------------------------------------------------------------------- /WebAppMvc/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WebAppsWithSharedLib/fd38eb29e4e114f8125848e87191172587f280c9/WebAppMvc/wwwroot/favicon.ico -------------------------------------------------------------------------------- /WebAppMvc/wwwroot/js/site.js: -------------------------------------------------------------------------------- 1 | // Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification 2 | // for details on configuring this project to bundle and minify static web assets. 3 | 4 | // Write your JavaScript code. 5 | -------------------------------------------------------------------------------- /WebAppMvc/wwwroot/lib/bootstrap/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2011-2018 Twitter, Inc. 4 | Copyright (c) 2011-2018 The Bootstrap Authors 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /WebAppMvc/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Reboot v4.3.1 (https://getbootstrap.com/) 3 | * Copyright 2011-2019 The Bootstrap Authors 4 | * Copyright 2011-2019 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) 7 | */ 8 | *, 9 | *::before, 10 | *::after { 11 | box-sizing: border-box; 12 | } 13 | 14 | html { 15 | font-family: sans-serif; 16 | line-height: 1.15; 17 | -webkit-text-size-adjust: 100%; 18 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 19 | } 20 | 21 | article, aside, figcaption, figure, footer, header, hgroup, main, nav, section { 22 | display: block; 23 | } 24 | 25 | body { 26 | margin: 0; 27 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; 28 | font-size: 1rem; 29 | font-weight: 400; 30 | line-height: 1.5; 31 | color: #212529; 32 | text-align: left; 33 | background-color: #fff; 34 | } 35 | 36 | [tabindex="-1"]:focus { 37 | outline: 0 !important; 38 | } 39 | 40 | hr { 41 | box-sizing: content-box; 42 | height: 0; 43 | overflow: visible; 44 | } 45 | 46 | h1, h2, h3, h4, h5, h6 { 47 | margin-top: 0; 48 | margin-bottom: 0.5rem; 49 | } 50 | 51 | p { 52 | margin-top: 0; 53 | margin-bottom: 1rem; 54 | } 55 | 56 | abbr[title], 57 | abbr[data-original-title] { 58 | text-decoration: underline; 59 | -webkit-text-decoration: underline dotted; 60 | text-decoration: underline dotted; 61 | cursor: help; 62 | border-bottom: 0; 63 | -webkit-text-decoration-skip-ink: none; 64 | text-decoration-skip-ink: none; 65 | } 66 | 67 | address { 68 | margin-bottom: 1rem; 69 | font-style: normal; 70 | line-height: inherit; 71 | } 72 | 73 | ol, 74 | ul, 75 | dl { 76 | margin-top: 0; 77 | margin-bottom: 1rem; 78 | } 79 | 80 | ol ol, 81 | ul ul, 82 | ol ul, 83 | ul ol { 84 | margin-bottom: 0; 85 | } 86 | 87 | dt { 88 | font-weight: 700; 89 | } 90 | 91 | dd { 92 | margin-bottom: .5rem; 93 | margin-left: 0; 94 | } 95 | 96 | blockquote { 97 | margin: 0 0 1rem; 98 | } 99 | 100 | b, 101 | strong { 102 | font-weight: bolder; 103 | } 104 | 105 | small { 106 | font-size: 80%; 107 | } 108 | 109 | sub, 110 | sup { 111 | position: relative; 112 | font-size: 75%; 113 | line-height: 0; 114 | vertical-align: baseline; 115 | } 116 | 117 | sub { 118 | bottom: -.25em; 119 | } 120 | 121 | sup { 122 | top: -.5em; 123 | } 124 | 125 | a { 126 | color: #007bff; 127 | text-decoration: none; 128 | background-color: transparent; 129 | } 130 | 131 | a:hover { 132 | color: #0056b3; 133 | text-decoration: underline; 134 | } 135 | 136 | a:not([href]):not([tabindex]) { 137 | color: inherit; 138 | text-decoration: none; 139 | } 140 | 141 | a:not([href]):not([tabindex]):hover, a:not([href]):not([tabindex]):focus { 142 | color: inherit; 143 | text-decoration: none; 144 | } 145 | 146 | a:not([href]):not([tabindex]):focus { 147 | outline: 0; 148 | } 149 | 150 | pre, 151 | code, 152 | kbd, 153 | samp { 154 | font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; 155 | font-size: 1em; 156 | } 157 | 158 | pre { 159 | margin-top: 0; 160 | margin-bottom: 1rem; 161 | overflow: auto; 162 | } 163 | 164 | figure { 165 | margin: 0 0 1rem; 166 | } 167 | 168 | img { 169 | vertical-align: middle; 170 | border-style: none; 171 | } 172 | 173 | svg { 174 | overflow: hidden; 175 | vertical-align: middle; 176 | } 177 | 178 | table { 179 | border-collapse: collapse; 180 | } 181 | 182 | caption { 183 | padding-top: 0.75rem; 184 | padding-bottom: 0.75rem; 185 | color: #6c757d; 186 | text-align: left; 187 | caption-side: bottom; 188 | } 189 | 190 | th { 191 | text-align: inherit; 192 | } 193 | 194 | label { 195 | display: inline-block; 196 | margin-bottom: 0.5rem; 197 | } 198 | 199 | button { 200 | border-radius: 0; 201 | } 202 | 203 | button:focus { 204 | outline: 1px dotted; 205 | outline: 5px auto -webkit-focus-ring-color; 206 | } 207 | 208 | input, 209 | button, 210 | select, 211 | optgroup, 212 | textarea { 213 | margin: 0; 214 | font-family: inherit; 215 | font-size: inherit; 216 | line-height: inherit; 217 | } 218 | 219 | button, 220 | input { 221 | overflow: visible; 222 | } 223 | 224 | button, 225 | select { 226 | text-transform: none; 227 | } 228 | 229 | select { 230 | word-wrap: normal; 231 | } 232 | 233 | button, 234 | [type="button"], 235 | [type="reset"], 236 | [type="submit"] { 237 | -webkit-appearance: button; 238 | } 239 | 240 | button:not(:disabled), 241 | [type="button"]:not(:disabled), 242 | [type="reset"]:not(:disabled), 243 | [type="submit"]:not(:disabled) { 244 | cursor: pointer; 245 | } 246 | 247 | button::-moz-focus-inner, 248 | [type="button"]::-moz-focus-inner, 249 | [type="reset"]::-moz-focus-inner, 250 | [type="submit"]::-moz-focus-inner { 251 | padding: 0; 252 | border-style: none; 253 | } 254 | 255 | input[type="radio"], 256 | input[type="checkbox"] { 257 | box-sizing: border-box; 258 | padding: 0; 259 | } 260 | 261 | input[type="date"], 262 | input[type="time"], 263 | input[type="datetime-local"], 264 | input[type="month"] { 265 | -webkit-appearance: listbox; 266 | } 267 | 268 | textarea { 269 | overflow: auto; 270 | resize: vertical; 271 | } 272 | 273 | fieldset { 274 | min-width: 0; 275 | padding: 0; 276 | margin: 0; 277 | border: 0; 278 | } 279 | 280 | legend { 281 | display: block; 282 | width: 100%; 283 | max-width: 100%; 284 | padding: 0; 285 | margin-bottom: .5rem; 286 | font-size: 1.5rem; 287 | line-height: inherit; 288 | color: inherit; 289 | white-space: normal; 290 | } 291 | 292 | progress { 293 | vertical-align: baseline; 294 | } 295 | 296 | [type="number"]::-webkit-inner-spin-button, 297 | [type="number"]::-webkit-outer-spin-button { 298 | height: auto; 299 | } 300 | 301 | [type="search"] { 302 | outline-offset: -2px; 303 | -webkit-appearance: none; 304 | } 305 | 306 | [type="search"]::-webkit-search-decoration { 307 | -webkit-appearance: none; 308 | } 309 | 310 | ::-webkit-file-upload-button { 311 | font: inherit; 312 | -webkit-appearance: button; 313 | } 314 | 315 | output { 316 | display: inline-block; 317 | } 318 | 319 | summary { 320 | display: list-item; 321 | cursor: pointer; 322 | } 323 | 324 | template { 325 | display: none; 326 | } 327 | 328 | [hidden] { 329 | display: none !important; 330 | } 331 | /*# sourceMappingURL=bootstrap-reboot.css.map */ -------------------------------------------------------------------------------- /WebAppMvc/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Reboot v4.3.1 (https://getbootstrap.com/) 3 | * Copyright 2011-2019 The Bootstrap Authors 4 | * Copyright 2011-2019 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) 7 | */*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important} 8 | /*# sourceMappingURL=bootstrap-reboot.min.css.map */ -------------------------------------------------------------------------------- /WebAppMvc/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) .NET Foundation. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | these files except in compliance with the License. You may obtain a copy of the 5 | License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software distributed 10 | under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | specific language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /WebAppMvc/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js: -------------------------------------------------------------------------------- 1 | // Unobtrusive validation support library for jQuery and jQuery Validate 2 | // Copyright (c) .NET Foundation. All rights reserved. 3 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 4 | // @version v3.2.11 5 | !function(a){"function"==typeof define&&define.amd?define("jquery.validate.unobtrusive",["jquery-validation"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery-validation")):jQuery.validator.unobtrusive=a(jQuery)}(function(a){function e(a,e,n){a.rules[e]=n,a.message&&(a.messages[e]=a.message)}function n(a){return a.replace(/^\s+|\s+$/g,"").split(/\s*,\s*/g)}function t(a){return a.replace(/([!"#$%&'()*+,.\/:;<=>?@\[\\\]^`{|}~])/g,"\\$1")}function r(a){return a.substr(0,a.lastIndexOf(".")+1)}function i(a,e){return 0===a.indexOf("*.")&&(a=a.replace("*.",e)),a}function o(e,n){var r=a(this).find("[data-valmsg-for='"+t(n[0].name)+"']"),i=r.attr("data-valmsg-replace"),o=i?a.parseJSON(i)!==!1:null;r.removeClass("field-validation-valid").addClass("field-validation-error"),e.data("unobtrusiveContainer",r),o?(r.empty(),e.removeClass("input-validation-error").appendTo(r)):e.hide()}function d(e,n){var t=a(this).find("[data-valmsg-summary=true]"),r=t.find("ul");r&&r.length&&n.errorList.length&&(r.empty(),t.addClass("validation-summary-errors").removeClass("validation-summary-valid"),a.each(n.errorList,function(){a("
  • ").html(this.message).appendTo(r)}))}function s(e){var n=e.data("unobtrusiveContainer");if(n){var t=n.attr("data-valmsg-replace"),r=t?a.parseJSON(t):null;n.addClass("field-validation-valid").removeClass("field-validation-error"),e.removeData("unobtrusiveContainer"),r&&n.empty()}}function l(e){var n=a(this),t="__jquery_unobtrusive_validation_form_reset";if(!n.data(t)){n.data(t,!0);try{n.data("validator").resetForm()}finally{n.removeData(t)}n.find(".validation-summary-errors").addClass("validation-summary-valid").removeClass("validation-summary-errors"),n.find(".field-validation-error").addClass("field-validation-valid").removeClass("field-validation-error").removeData("unobtrusiveContainer").find(">*").removeData("unobtrusiveContainer")}}function u(e){var n=a(e),t=n.data(v),r=a.proxy(l,e),i=f.unobtrusive.options||{},u=function(n,t){var r=i[n];r&&a.isFunction(r)&&r.apply(e,t)};return t||(t={options:{errorClass:i.errorClass||"input-validation-error",errorElement:i.errorElement||"span",errorPlacement:function(){o.apply(e,arguments),u("errorPlacement",arguments)},invalidHandler:function(){d.apply(e,arguments),u("invalidHandler",arguments)},messages:{},rules:{},success:function(){s.apply(e,arguments),u("success",arguments)}},attachValidation:function(){n.off("reset."+v,r).on("reset."+v,r).validate(this.options)},validate:function(){return n.validate(),n.valid()}},n.data(v,t)),t}var m,f=a.validator,v="unobtrusiveValidation";return f.unobtrusive={adapters:[],parseElement:function(e,n){var t,r,i,o=a(e),d=o.parents("form")[0];d&&(t=u(d),t.options.rules[e.name]=r={},t.options.messages[e.name]=i={},a.each(this.adapters,function(){var n="data-val-"+this.name,t=o.attr(n),s={};void 0!==t&&(n+="-",a.each(this.params,function(){s[this]=o.attr(n+this)}),this.adapt({element:e,form:d,message:t,params:s,rules:r,messages:i}))}),a.extend(r,{__dummy__:!0}),n||t.attachValidation())},parse:function(e){var n=a(e),t=n.parents().addBack().filter("form").add(n.find("form")).has("[data-val=true]");n.find("[data-val=true]").each(function(){f.unobtrusive.parseElement(this,!0)}),t.each(function(){var a=u(this);a&&a.attachValidation()})}},m=f.unobtrusive.adapters,m.add=function(a,e,n){return n||(n=e,e=[]),this.push({name:a,params:e,adapt:n}),this},m.addBool=function(a,n){return this.add(a,function(t){e(t,n||a,!0)})},m.addMinMax=function(a,n,t,r,i,o){return this.add(a,[i||"min",o||"max"],function(a){var i=a.params.min,o=a.params.max;i&&o?e(a,r,[i,o]):i?e(a,n,i):o&&e(a,t,o)})},m.addSingleVal=function(a,n,t){return this.add(a,[n||"val"],function(r){e(r,t||a,r.params[n])})},f.addMethod("__dummy__",function(a,e,n){return!0}),f.addMethod("regex",function(a,e,n){var t;return!!this.optional(e)||(t=new RegExp(n).exec(a),t&&0===t.index&&t[0].length===a.length)}),f.addMethod("nonalphamin",function(a,e,n){var t;return n&&(t=a.match(/\W/g),t=t&&t.length>=n),t}),f.methods.extension?(m.addSingleVal("accept","mimtype"),m.addSingleVal("extension","extension")):m.addSingleVal("extension","extension","accept"),m.addSingleVal("regex","pattern"),m.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url"),m.addMinMax("length","minlength","maxlength","rangelength").addMinMax("range","min","max","range"),m.addMinMax("minlength","minlength").addMinMax("maxlength","minlength","maxlength"),m.add("equalto",["other"],function(n){var o=r(n.element.name),d=n.params.other,s=i(d,o),l=a(n.form).find(":input").filter("[name='"+t(s)+"']")[0];e(n,"equalTo",l)}),m.add("required",function(a){"INPUT"===a.element.tagName.toUpperCase()&&"CHECKBOX"===a.element.type.toUpperCase()||e(a,"required",!0)}),m.add("remote",["url","type","additionalfields"],function(o){var d={url:o.params.url,type:o.params.type||"GET",data:{}},s=r(o.element.name);a.each(n(o.params.additionalfields||o.element.name),function(e,n){var r=i(n,s);d.data[r]=function(){var e=a(o.form).find(":input").filter("[name='"+t(r)+"']");return e.is(":checkbox")?e.filter(":checked").val()||e.filter(":hidden").val()||"":e.is(":radio")?e.filter(":checked").val()||"":e.val()}}),e(o,"remote",d)}),m.add("password",["min","nonalphamin","regex"],function(a){a.params.min&&e(a,"minlength",a.params.min),a.params.nonalphamin&&e(a,"nonalphamin",a.params.nonalphamin),a.params.regex&&e(a,"regex",a.params.regex)}),m.add("fileextensions",["extensions"],function(a){e(a,"extension",a.params.extensions)}),a(function(){f.unobtrusive.parse(document)}),f.unobtrusive}); -------------------------------------------------------------------------------- /WebAppMvc/wwwroot/lib/jquery-validation/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | ===================== 3 | 4 | Copyright Jörn Zaefferer 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /WebAppMvc/wwwroot/lib/jquery/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright JS Foundation and other contributors, https://js.foundation/ 2 | 3 | This software consists of voluntary contributions made by many 4 | individuals. For exact contribution history, see the revision history 5 | available at https://github.com/jquery/jquery 6 | 7 | The following license applies to all parts of this software except as 8 | documented below: 9 | 10 | ==== 11 | 12 | Permission is hereby granted, free of charge, to any person obtaining 13 | a copy of this software and associated documentation files (the 14 | "Software"), to deal in the Software without restriction, including 15 | without limitation the rights to use, copy, modify, merge, publish, 16 | distribute, sublicense, and/or sell copies of the Software, and to 17 | permit persons to whom the Software is furnished to do so, subject to 18 | the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be 21 | included in all copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | 31 | ==== 32 | 33 | All files located in the node_modules and external directories are 34 | externally maintained libraries used by this software which have their 35 | own licenses; we recommend you read them, as their terms may differ from 36 | the terms above. 37 | -------------------------------------------------------------------------------- /WebAppPages/Areas/Identity/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "/Pages/Shared/_Layout.cshtml"; 3 | } 4 | -------------------------------------------------------------------------------- /WebAppPages/Pages/CinematicItems/Create.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model WebAppPages.CreateModel 3 | 4 | @{ 5 | ViewData["Title"] = "Create"; 6 | } 7 | 8 |

    Create

    9 | 10 |

    CinematicItem

    11 |
    12 |
    13 |
    14 |
    15 |
    16 |
    17 | 18 | 19 | 20 |
    21 |
    22 | 23 | 24 | 25 |
    26 |
    27 | 28 | 29 | 30 |
    31 |
    32 | 33 | 34 | 35 |
    36 |
    37 | 38 |
    39 |
    40 |
    41 |
    42 | 43 |
    44 | Back to List 45 |
    46 | 47 | @section Scripts { 48 | @{await Html.RenderPartialAsync("_ValidationScriptsPartial");} 49 | } 50 | -------------------------------------------------------------------------------- /WebAppPages/Pages/CinematicItems/Create.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using Microsoft.AspNetCore.Mvc.Rendering; 8 | using SharedLib.Data; 9 | using SharedLib.Models; 10 | 11 | namespace WebAppPages 12 | { 13 | public class CreateModel : PageModel 14 | { 15 | private readonly SharedLib.Data.LibDbContext _context; 16 | 17 | public CreateModel(SharedLib.Data.LibDbContext context) 18 | { 19 | _context = context; 20 | } 21 | 22 | public IActionResult OnGet() 23 | { 24 | return Page(); 25 | } 26 | 27 | [BindProperty] 28 | public CinematicItem CinematicItem { get; set; } 29 | 30 | // To protect from overposting attacks, please enable the specific properties you want to bind to, for 31 | // more details see https://aka.ms/RazorPagesCRUD. 32 | public async Task OnPostAsync() 33 | { 34 | if (!ModelState.IsValid) 35 | { 36 | return Page(); 37 | } 38 | 39 | _context.CinematicItems.Add(CinematicItem); 40 | await _context.SaveChangesAsync(); 41 | 42 | return RedirectToPage("./Index"); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /WebAppPages/Pages/CinematicItems/Delete.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model WebAppPages.DeleteModel 3 | 4 | @{ 5 | ViewData["Title"] = "Delete"; 6 | } 7 | 8 |

    Delete

    9 | 10 |

    Are you sure you want to delete this?

    11 |
    12 |

    CinematicItem

    13 |
    14 |
    15 |
    16 | @Html.DisplayNameFor(model => model.CinematicItem.Name) 17 |
    18 |
    19 | @Html.DisplayFor(model => model.CinematicItem.Name) 20 |
    21 |
    22 | @Html.DisplayNameFor(model => model.CinematicItem.Description) 23 |
    24 |
    25 | @Html.DisplayFor(model => model.CinematicItem.Description) 26 |
    27 |
    28 | @Html.DisplayNameFor(model => model.CinematicItem.Phase) 29 |
    30 |
    31 | @Html.DisplayFor(model => model.CinematicItem.Phase) 32 |
    33 |
    34 | @Html.DisplayNameFor(model => model.CinematicItem.ReleaseDate) 35 |
    36 |
    37 | @Html.DisplayFor(model => model.CinematicItem.ReleaseDate) 38 |
    39 |
    40 | 41 |
    42 | 43 | | 44 | Back to List 45 |
    46 |
    47 | -------------------------------------------------------------------------------- /WebAppPages/Pages/CinematicItems/Delete.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using Microsoft.EntityFrameworkCore; 8 | using SharedLib.Data; 9 | using SharedLib.Models; 10 | 11 | namespace WebAppPages 12 | { 13 | public class DeleteModel : PageModel 14 | { 15 | private readonly SharedLib.Data.LibDbContext _context; 16 | 17 | public DeleteModel(SharedLib.Data.LibDbContext context) 18 | { 19 | _context = context; 20 | } 21 | 22 | [BindProperty] 23 | public CinematicItem CinematicItem { get; set; } 24 | 25 | public async Task OnGetAsync(int? id) 26 | { 27 | if (id == null) 28 | { 29 | return NotFound(); 30 | } 31 | 32 | CinematicItem = await _context.CinematicItems.FirstOrDefaultAsync(m => m.Id == id); 33 | 34 | if (CinematicItem == null) 35 | { 36 | return NotFound(); 37 | } 38 | return Page(); 39 | } 40 | 41 | public async Task OnPostAsync(int? id) 42 | { 43 | if (id == null) 44 | { 45 | return NotFound(); 46 | } 47 | 48 | CinematicItem = await _context.CinematicItems.FindAsync(id); 49 | 50 | if (CinematicItem != null) 51 | { 52 | _context.CinematicItems.Remove(CinematicItem); 53 | await _context.SaveChangesAsync(); 54 | } 55 | 56 | return RedirectToPage("./Index"); 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /WebAppPages/Pages/CinematicItems/Details.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model WebAppPages.DetailsModel 3 | 4 | @{ 5 | ViewData["Title"] = "Details"; 6 | } 7 | 8 |

    Details

    9 | 10 |
    11 |

    CinematicItem

    12 |
    13 |
    14 |
    15 | @Html.DisplayNameFor(model => model.CinematicItem.Name) 16 |
    17 |
    18 | @Html.DisplayFor(model => model.CinematicItem.Name) 19 |
    20 |
    21 | @Html.DisplayNameFor(model => model.CinematicItem.Description) 22 |
    23 |
    24 | @Html.DisplayFor(model => model.CinematicItem.Description) 25 |
    26 |
    27 | @Html.DisplayNameFor(model => model.CinematicItem.Phase) 28 |
    29 |
    30 | @Html.DisplayFor(model => model.CinematicItem.Phase) 31 |
    32 |
    33 | @Html.DisplayNameFor(model => model.CinematicItem.ReleaseDate) 34 |
    35 |
    36 | @Html.DisplayFor(model => model.CinematicItem.ReleaseDate) 37 |
    38 |
    39 |
    40 |
    41 | Edit | 42 | Back to List 43 |
    44 | -------------------------------------------------------------------------------- /WebAppPages/Pages/CinematicItems/Details.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using Microsoft.EntityFrameworkCore; 8 | using SharedLib.Data; 9 | using SharedLib.Models; 10 | 11 | namespace WebAppPages 12 | { 13 | public class DetailsModel : PageModel 14 | { 15 | private readonly SharedLib.Data.LibDbContext _context; 16 | 17 | public DetailsModel(SharedLib.Data.LibDbContext context) 18 | { 19 | _context = context; 20 | } 21 | 22 | public CinematicItem CinematicItem { get; set; } 23 | 24 | public async Task OnGetAsync(int? id) 25 | { 26 | if (id == null) 27 | { 28 | return NotFound(); 29 | } 30 | 31 | CinematicItem = await _context.CinematicItems.FirstOrDefaultAsync(m => m.Id == id); 32 | 33 | if (CinematicItem == null) 34 | { 35 | return NotFound(); 36 | } 37 | return Page(); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /WebAppPages/Pages/CinematicItems/Edit.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model WebAppPages.EditModel 3 | 4 | @{ 5 | ViewData["Title"] = "Edit"; 6 | } 7 | 8 |

    Edit

    9 | 10 |

    CinematicItem

    11 |
    12 |
    13 |
    14 |
    15 |
    16 | 17 |
    18 | 19 | 20 | 21 |
    22 |
    23 | 24 | 25 | 26 |
    27 |
    28 | 29 | 30 | 31 |
    32 |
    33 | 34 | 35 | 36 |
    37 |
    38 | 39 |
    40 |
    41 |
    42 |
    43 | 44 |
    45 | Back to List 46 |
    47 | 48 | @section Scripts { 49 | @{await Html.RenderPartialAsync("_ValidationScriptsPartial");} 50 | } 51 | -------------------------------------------------------------------------------- /WebAppPages/Pages/CinematicItems/Edit.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using Microsoft.AspNetCore.Mvc.Rendering; 8 | using Microsoft.EntityFrameworkCore; 9 | using SharedLib.Data; 10 | using SharedLib.Models; 11 | 12 | namespace WebAppPages 13 | { 14 | public class EditModel : PageModel 15 | { 16 | private readonly SharedLib.Data.LibDbContext _context; 17 | 18 | public EditModel(SharedLib.Data.LibDbContext context) 19 | { 20 | _context = context; 21 | } 22 | 23 | [BindProperty] 24 | public CinematicItem CinematicItem { get; set; } 25 | 26 | public async Task OnGetAsync(int? id) 27 | { 28 | if (id == null) 29 | { 30 | return NotFound(); 31 | } 32 | 33 | CinematicItem = await _context.CinematicItems.FirstOrDefaultAsync(m => m.Id == id); 34 | 35 | if (CinematicItem == null) 36 | { 37 | return NotFound(); 38 | } 39 | return Page(); 40 | } 41 | 42 | // To protect from overposting attacks, please enable the specific properties you want to bind to, for 43 | // more details see https://aka.ms/RazorPagesCRUD. 44 | public async Task OnPostAsync() 45 | { 46 | if (!ModelState.IsValid) 47 | { 48 | return Page(); 49 | } 50 | 51 | _context.Attach(CinematicItem).State = EntityState.Modified; 52 | 53 | try 54 | { 55 | await _context.SaveChangesAsync(); 56 | } 57 | catch (DbUpdateConcurrencyException) 58 | { 59 | if (!CinematicItemExists(CinematicItem.Id)) 60 | { 61 | return NotFound(); 62 | } 63 | else 64 | { 65 | throw; 66 | } 67 | } 68 | 69 | return RedirectToPage("./Index"); 70 | } 71 | 72 | private bool CinematicItemExists(int id) 73 | { 74 | return _context.CinematicItems.Any(e => e.Id == id); 75 | } 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /WebAppPages/Pages/CinematicItems/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model WebAppPages.IndexModel 3 | 4 | @{ 5 | ViewData["Title"] = "Index"; 6 | } 7 | 8 |

    Index

    9 | 10 |

    11 | Create New 12 |

    13 | 14 | 15 | 16 | 19 | 22 | 25 | 28 | 29 | 30 | 31 | 32 | @foreach (var item in Model.CinematicItem) { 33 | 34 | 37 | 40 | 43 | 46 | 51 | 52 | } 53 | 54 |
    17 | @Html.DisplayNameFor(model => model.CinematicItem[0].Name) 18 | 20 | @Html.DisplayNameFor(model => model.CinematicItem[0].Description) 21 | 23 | @Html.DisplayNameFor(model => model.CinematicItem[0].Phase) 24 | 26 | @Html.DisplayNameFor(model => model.CinematicItem[0].ReleaseDate) 27 |
    35 | @Html.DisplayFor(modelItem => item.Name) 36 | 38 | @Html.DisplayFor(modelItem => item.Description) 39 | 41 | @Html.DisplayFor(modelItem => item.Phase) 42 | 44 | @Html.DisplayFor(modelItem => item.ReleaseDate) 45 | 47 | Edit | 48 | Details | 49 | Delete 50 |
    55 | -------------------------------------------------------------------------------- /WebAppPages/Pages/CinematicItems/Index.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using Microsoft.EntityFrameworkCore; 8 | using SharedLib.Data; 9 | using SharedLib.Models; 10 | 11 | namespace WebAppPages 12 | { 13 | public class IndexModel : PageModel 14 | { 15 | private readonly SharedLib.Data.LibDbContext _context; 16 | 17 | public IndexModel(SharedLib.Data.LibDbContext context) 18 | { 19 | _context = context; 20 | } 21 | 22 | public IList CinematicItem { get;set; } 23 | 24 | public async Task OnGetAsync() 25 | { 26 | CinematicItem = await _context.CinematicItems.ToListAsync(); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /WebAppPages/Pages/Error.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ErrorModel 3 | @{ 4 | ViewData["Title"] = "Error"; 5 | } 6 | 7 |

    Error.

    8 |

    An error occurred while processing your request.

    9 | 10 | @if (Model.ShowRequestId) 11 | { 12 |

    13 | Request ID: @Model.RequestId 14 |

    15 | } 16 | 17 |

    Development Mode

    18 |

    19 | Swapping to the Development environment displays detailed information about the error that occurred. 20 |

    21 |

    22 | The Development environment shouldn't be enabled for deployed applications. 23 | It can result in displaying sensitive information from exceptions to end users. 24 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 25 | and restarting the app. 26 |

    27 | -------------------------------------------------------------------------------- /WebAppPages/Pages/Error.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore.Mvc; 7 | using Microsoft.AspNetCore.Mvc.RazorPages; 8 | using Microsoft.Extensions.Logging; 9 | 10 | namespace WebAppPages.Pages 11 | { 12 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 13 | public class ErrorModel : PageModel 14 | { 15 | public string RequestId { get; set; } 16 | 17 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 18 | 19 | private readonly ILogger _logger; 20 | 21 | public ErrorModel(ILogger logger) 22 | { 23 | _logger = logger; 24 | } 25 | 26 | public void OnGet() 27 | { 28 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /WebAppPages/Pages/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model IndexModel 3 | @{ 4 | ViewData["Title"] = "Home page"; 5 | } 6 | 7 |
    8 |

    Welcome

    9 |

    Learn about building Web apps with ASP.NET Core.

    10 |
    11 | -------------------------------------------------------------------------------- /WebAppPages/Pages/Index.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using Microsoft.Extensions.Logging; 8 | 9 | namespace WebAppPages.Pages 10 | { 11 | public class IndexModel : PageModel 12 | { 13 | private readonly ILogger _logger; 14 | 15 | public IndexModel(ILogger logger) 16 | { 17 | _logger = logger; 18 | } 19 | 20 | public void OnGet() 21 | { 22 | 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /WebAppPages/Pages/Privacy.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model PrivacyModel 3 | @{ 4 | ViewData["Title"] = "Privacy Policy"; 5 | } 6 |

    @ViewData["Title"]

    7 | 8 |

    Use this page to detail your site's privacy policy.

    9 | -------------------------------------------------------------------------------- /WebAppPages/Pages/Privacy.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using Microsoft.Extensions.Logging; 8 | 9 | namespace WebAppPages.Pages 10 | { 11 | public class PrivacyModel : PageModel 12 | { 13 | private readonly ILogger _logger; 14 | 15 | public PrivacyModel(ILogger logger) 16 | { 17 | _logger = logger; 18 | } 19 | 20 | public void OnGet() 21 | { 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /WebAppPages/Pages/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | @ViewData["Title"] - WebAppPages 7 | 8 | 9 | 10 | 11 |
    12 | 32 |
    33 |
    34 |
    35 | @RenderBody() 36 |
    37 |
    38 | 39 |
    40 |
    41 | © 2019 - WebAppPages - Privacy 42 |
    43 |
    44 | 45 | 46 | 47 | 48 | 49 | @RenderSection("Scripts", required: false) 50 | 51 | 52 | -------------------------------------------------------------------------------- /WebAppPages/Pages/Shared/_LoginPartial.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Identity 2 | @inject SignInManager SignInManager 3 | @inject UserManager UserManager 4 | 5 | 27 | -------------------------------------------------------------------------------- /WebAppPages/Pages/Shared/_ValidationScriptsPartial.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | -------------------------------------------------------------------------------- /WebAppPages/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Identity 2 | @using WebAppPages 3 | @using SharedLib.Data 4 | @namespace WebAppPages.Pages 5 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 6 | -------------------------------------------------------------------------------- /WebAppPages/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /WebAppPages/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Hosting; 6 | using Microsoft.Extensions.Configuration; 7 | using Microsoft.Extensions.Hosting; 8 | using Microsoft.Extensions.Logging; 9 | 10 | namespace WebAppPages 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 | .ConfigureWebHostDefaults(webBuilder => 22 | { 23 | webBuilder.UseStartup(); 24 | }); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /WebAppPages/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:62520", 7 | "sslPort": 44321 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "WebAppPages": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 22 | "environmentVariables": { 23 | "ASPNETCORE_ENVIRONMENT": "Development" 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /WebAppPages/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.Identity; 7 | using Microsoft.AspNetCore.Identity.UI; 8 | using Microsoft.AspNetCore.Hosting; 9 | using Microsoft.AspNetCore.HttpsPolicy; 10 | using Microsoft.EntityFrameworkCore; 11 | using Microsoft.Extensions.Configuration; 12 | using Microsoft.Extensions.DependencyInjection; 13 | using Microsoft.Extensions.Hosting; 14 | using SharedLib.Data; 15 | 16 | namespace WebAppPages 17 | { 18 | public class Startup 19 | { 20 | public Startup(IConfiguration configuration) 21 | { 22 | Configuration = configuration; 23 | } 24 | 25 | public IConfiguration Configuration { get; } 26 | 27 | // This method gets called by the runtime. Use this method to add services to the container. 28 | public void ConfigureServices(IServiceCollection services) 29 | { 30 | services.AddDbContext(options => 31 | { 32 | options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection"), 33 | assembly => assembly.MigrationsAssembly(typeof(LibDbContext).Assembly.FullName)); 34 | }); 35 | services.AddDefaultIdentity(options => options.SignIn.RequireConfirmedAccount = true) 36 | .AddEntityFrameworkStores(); 37 | services.AddRazorPages(); 38 | } 39 | 40 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. 41 | public void Configure(IApplicationBuilder app, IWebHostEnvironment env) 42 | { 43 | if (env.IsDevelopment()) 44 | { 45 | app.UseDeveloperExceptionPage(); 46 | app.UseDatabaseErrorPage(); 47 | } 48 | else 49 | { 50 | app.UseExceptionHandler("/Error"); 51 | // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. 52 | app.UseHsts(); 53 | } 54 | 55 | app.UseHttpsRedirection(); 56 | app.UseStaticFiles(); 57 | 58 | app.UseRouting(); 59 | 60 | app.UseAuthentication(); 61 | app.UseAuthorization(); 62 | 63 | app.UseEndpoints(endpoints => 64 | { 65 | endpoints.MapRazorPages(); 66 | }); 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /WebAppPages/WebAppPages.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | aspnet-WebAppPages-85AE9DAF-DB38-4F99-B55F-4DA917000F97 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /WebAppPages/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /WebAppPages/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConnectionStrings": { 3 | "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=aspnet-WebAppMvc-DBB721AE-DAF5-4CEE-969F-07CEACDCD7AE;Trusted_Connection=True;MultipleActiveResultSets=true" 4 | }, 5 | "Logging": { 6 | "LogLevel": { 7 | "Default": "Information", 8 | "Microsoft": "Warning", 9 | "Microsoft.Hosting.Lifetime": "Information" 10 | } 11 | }, 12 | "AllowedHosts": "*" 13 | } 14 | -------------------------------------------------------------------------------- /WebAppPages/wwwroot/css/site.css: -------------------------------------------------------------------------------- 1 | /* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification 2 | for details on configuring this project to bundle and minify static web assets. */ 3 | 4 | a.navbar-brand { 5 | white-space: normal; 6 | text-align: center; 7 | word-break: break-all; 8 | } 9 | 10 | /* Provide sufficient contrast against white background */ 11 | a { 12 | color: #0366d6; 13 | } 14 | 15 | .btn-primary { 16 | color: #fff; 17 | background-color: #1b6ec2; 18 | border-color: #1861ac; 19 | } 20 | 21 | .nav-pills .nav-link.active, .nav-pills .show > .nav-link { 22 | color: #fff; 23 | background-color: #1b6ec2; 24 | border-color: #1861ac; 25 | } 26 | 27 | /* Sticky footer styles 28 | -------------------------------------------------- */ 29 | html { 30 | font-size: 14px; 31 | } 32 | @media (min-width: 768px) { 33 | html { 34 | font-size: 16px; 35 | } 36 | } 37 | 38 | .border-top { 39 | border-top: 1px solid #e5e5e5; 40 | } 41 | .border-bottom { 42 | border-bottom: 1px solid #e5e5e5; 43 | } 44 | 45 | .box-shadow { 46 | box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05); 47 | } 48 | 49 | button.accept-policy { 50 | font-size: 1rem; 51 | line-height: inherit; 52 | } 53 | 54 | /* Sticky footer styles 55 | -------------------------------------------------- */ 56 | html { 57 | position: relative; 58 | min-height: 100%; 59 | } 60 | 61 | body { 62 | /* Margin bottom by footer height */ 63 | margin-bottom: 60px; 64 | } 65 | .footer { 66 | position: absolute; 67 | bottom: 0; 68 | width: 100%; 69 | white-space: nowrap; 70 | line-height: 60px; /* Vertically center the text there */ 71 | } 72 | -------------------------------------------------------------------------------- /WebAppPages/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahedc/WebAppsWithSharedLib/fd38eb29e4e114f8125848e87191172587f280c9/WebAppPages/wwwroot/favicon.ico -------------------------------------------------------------------------------- /WebAppPages/wwwroot/js/site.js: -------------------------------------------------------------------------------- 1 | // Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification 2 | // for details on configuring this project to bundle and minify static web assets. 3 | 4 | // Write your Javascript code. 5 | -------------------------------------------------------------------------------- /WebAppPages/wwwroot/lib/bootstrap/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2011-2018 Twitter, Inc. 4 | Copyright (c) 2011-2018 The Bootstrap Authors 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /WebAppPages/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Reboot v4.3.1 (https://getbootstrap.com/) 3 | * Copyright 2011-2019 The Bootstrap Authors 4 | * Copyright 2011-2019 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) 7 | */ 8 | *, 9 | *::before, 10 | *::after { 11 | box-sizing: border-box; 12 | } 13 | 14 | html { 15 | font-family: sans-serif; 16 | line-height: 1.15; 17 | -webkit-text-size-adjust: 100%; 18 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 19 | } 20 | 21 | article, aside, figcaption, figure, footer, header, hgroup, main, nav, section { 22 | display: block; 23 | } 24 | 25 | body { 26 | margin: 0; 27 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; 28 | font-size: 1rem; 29 | font-weight: 400; 30 | line-height: 1.5; 31 | color: #212529; 32 | text-align: left; 33 | background-color: #fff; 34 | } 35 | 36 | [tabindex="-1"]:focus { 37 | outline: 0 !important; 38 | } 39 | 40 | hr { 41 | box-sizing: content-box; 42 | height: 0; 43 | overflow: visible; 44 | } 45 | 46 | h1, h2, h3, h4, h5, h6 { 47 | margin-top: 0; 48 | margin-bottom: 0.5rem; 49 | } 50 | 51 | p { 52 | margin-top: 0; 53 | margin-bottom: 1rem; 54 | } 55 | 56 | abbr[title], 57 | abbr[data-original-title] { 58 | text-decoration: underline; 59 | -webkit-text-decoration: underline dotted; 60 | text-decoration: underline dotted; 61 | cursor: help; 62 | border-bottom: 0; 63 | -webkit-text-decoration-skip-ink: none; 64 | text-decoration-skip-ink: none; 65 | } 66 | 67 | address { 68 | margin-bottom: 1rem; 69 | font-style: normal; 70 | line-height: inherit; 71 | } 72 | 73 | ol, 74 | ul, 75 | dl { 76 | margin-top: 0; 77 | margin-bottom: 1rem; 78 | } 79 | 80 | ol ol, 81 | ul ul, 82 | ol ul, 83 | ul ol { 84 | margin-bottom: 0; 85 | } 86 | 87 | dt { 88 | font-weight: 700; 89 | } 90 | 91 | dd { 92 | margin-bottom: .5rem; 93 | margin-left: 0; 94 | } 95 | 96 | blockquote { 97 | margin: 0 0 1rem; 98 | } 99 | 100 | b, 101 | strong { 102 | font-weight: bolder; 103 | } 104 | 105 | small { 106 | font-size: 80%; 107 | } 108 | 109 | sub, 110 | sup { 111 | position: relative; 112 | font-size: 75%; 113 | line-height: 0; 114 | vertical-align: baseline; 115 | } 116 | 117 | sub { 118 | bottom: -.25em; 119 | } 120 | 121 | sup { 122 | top: -.5em; 123 | } 124 | 125 | a { 126 | color: #007bff; 127 | text-decoration: none; 128 | background-color: transparent; 129 | } 130 | 131 | a:hover { 132 | color: #0056b3; 133 | text-decoration: underline; 134 | } 135 | 136 | a:not([href]):not([tabindex]) { 137 | color: inherit; 138 | text-decoration: none; 139 | } 140 | 141 | a:not([href]):not([tabindex]):hover, a:not([href]):not([tabindex]):focus { 142 | color: inherit; 143 | text-decoration: none; 144 | } 145 | 146 | a:not([href]):not([tabindex]):focus { 147 | outline: 0; 148 | } 149 | 150 | pre, 151 | code, 152 | kbd, 153 | samp { 154 | font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; 155 | font-size: 1em; 156 | } 157 | 158 | pre { 159 | margin-top: 0; 160 | margin-bottom: 1rem; 161 | overflow: auto; 162 | } 163 | 164 | figure { 165 | margin: 0 0 1rem; 166 | } 167 | 168 | img { 169 | vertical-align: middle; 170 | border-style: none; 171 | } 172 | 173 | svg { 174 | overflow: hidden; 175 | vertical-align: middle; 176 | } 177 | 178 | table { 179 | border-collapse: collapse; 180 | } 181 | 182 | caption { 183 | padding-top: 0.75rem; 184 | padding-bottom: 0.75rem; 185 | color: #6c757d; 186 | text-align: left; 187 | caption-side: bottom; 188 | } 189 | 190 | th { 191 | text-align: inherit; 192 | } 193 | 194 | label { 195 | display: inline-block; 196 | margin-bottom: 0.5rem; 197 | } 198 | 199 | button { 200 | border-radius: 0; 201 | } 202 | 203 | button:focus { 204 | outline: 1px dotted; 205 | outline: 5px auto -webkit-focus-ring-color; 206 | } 207 | 208 | input, 209 | button, 210 | select, 211 | optgroup, 212 | textarea { 213 | margin: 0; 214 | font-family: inherit; 215 | font-size: inherit; 216 | line-height: inherit; 217 | } 218 | 219 | button, 220 | input { 221 | overflow: visible; 222 | } 223 | 224 | button, 225 | select { 226 | text-transform: none; 227 | } 228 | 229 | select { 230 | word-wrap: normal; 231 | } 232 | 233 | button, 234 | [type="button"], 235 | [type="reset"], 236 | [type="submit"] { 237 | -webkit-appearance: button; 238 | } 239 | 240 | button:not(:disabled), 241 | [type="button"]:not(:disabled), 242 | [type="reset"]:not(:disabled), 243 | [type="submit"]:not(:disabled) { 244 | cursor: pointer; 245 | } 246 | 247 | button::-moz-focus-inner, 248 | [type="button"]::-moz-focus-inner, 249 | [type="reset"]::-moz-focus-inner, 250 | [type="submit"]::-moz-focus-inner { 251 | padding: 0; 252 | border-style: none; 253 | } 254 | 255 | input[type="radio"], 256 | input[type="checkbox"] { 257 | box-sizing: border-box; 258 | padding: 0; 259 | } 260 | 261 | input[type="date"], 262 | input[type="time"], 263 | input[type="datetime-local"], 264 | input[type="month"] { 265 | -webkit-appearance: listbox; 266 | } 267 | 268 | textarea { 269 | overflow: auto; 270 | resize: vertical; 271 | } 272 | 273 | fieldset { 274 | min-width: 0; 275 | padding: 0; 276 | margin: 0; 277 | border: 0; 278 | } 279 | 280 | legend { 281 | display: block; 282 | width: 100%; 283 | max-width: 100%; 284 | padding: 0; 285 | margin-bottom: .5rem; 286 | font-size: 1.5rem; 287 | line-height: inherit; 288 | color: inherit; 289 | white-space: normal; 290 | } 291 | 292 | progress { 293 | vertical-align: baseline; 294 | } 295 | 296 | [type="number"]::-webkit-inner-spin-button, 297 | [type="number"]::-webkit-outer-spin-button { 298 | height: auto; 299 | } 300 | 301 | [type="search"] { 302 | outline-offset: -2px; 303 | -webkit-appearance: none; 304 | } 305 | 306 | [type="search"]::-webkit-search-decoration { 307 | -webkit-appearance: none; 308 | } 309 | 310 | ::-webkit-file-upload-button { 311 | font: inherit; 312 | -webkit-appearance: button; 313 | } 314 | 315 | output { 316 | display: inline-block; 317 | } 318 | 319 | summary { 320 | display: list-item; 321 | cursor: pointer; 322 | } 323 | 324 | template { 325 | display: none; 326 | } 327 | 328 | [hidden] { 329 | display: none !important; 330 | } 331 | /*# sourceMappingURL=bootstrap-reboot.css.map */ -------------------------------------------------------------------------------- /WebAppPages/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Reboot v4.3.1 (https://getbootstrap.com/) 3 | * Copyright 2011-2019 The Bootstrap Authors 4 | * Copyright 2011-2019 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) 7 | */*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important} 8 | /*# sourceMappingURL=bootstrap-reboot.min.css.map */ -------------------------------------------------------------------------------- /WebAppPages/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) .NET Foundation. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | these files except in compliance with the License. You may obtain a copy of the 5 | License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software distributed 10 | under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | specific language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /WebAppPages/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js: -------------------------------------------------------------------------------- 1 | // Unobtrusive validation support library for jQuery and jQuery Validate 2 | // Copyright (c) .NET Foundation. All rights reserved. 3 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 4 | // @version v3.2.11 5 | !function(a){"function"==typeof define&&define.amd?define("jquery.validate.unobtrusive",["jquery-validation"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery-validation")):jQuery.validator.unobtrusive=a(jQuery)}(function(a){function e(a,e,n){a.rules[e]=n,a.message&&(a.messages[e]=a.message)}function n(a){return a.replace(/^\s+|\s+$/g,"").split(/\s*,\s*/g)}function t(a){return a.replace(/([!"#$%&'()*+,.\/:;<=>?@\[\\\]^`{|}~])/g,"\\$1")}function r(a){return a.substr(0,a.lastIndexOf(".")+1)}function i(a,e){return 0===a.indexOf("*.")&&(a=a.replace("*.",e)),a}function o(e,n){var r=a(this).find("[data-valmsg-for='"+t(n[0].name)+"']"),i=r.attr("data-valmsg-replace"),o=i?a.parseJSON(i)!==!1:null;r.removeClass("field-validation-valid").addClass("field-validation-error"),e.data("unobtrusiveContainer",r),o?(r.empty(),e.removeClass("input-validation-error").appendTo(r)):e.hide()}function d(e,n){var t=a(this).find("[data-valmsg-summary=true]"),r=t.find("ul");r&&r.length&&n.errorList.length&&(r.empty(),t.addClass("validation-summary-errors").removeClass("validation-summary-valid"),a.each(n.errorList,function(){a("
  • ").html(this.message).appendTo(r)}))}function s(e){var n=e.data("unobtrusiveContainer");if(n){var t=n.attr("data-valmsg-replace"),r=t?a.parseJSON(t):null;n.addClass("field-validation-valid").removeClass("field-validation-error"),e.removeData("unobtrusiveContainer"),r&&n.empty()}}function l(e){var n=a(this),t="__jquery_unobtrusive_validation_form_reset";if(!n.data(t)){n.data(t,!0);try{n.data("validator").resetForm()}finally{n.removeData(t)}n.find(".validation-summary-errors").addClass("validation-summary-valid").removeClass("validation-summary-errors"),n.find(".field-validation-error").addClass("field-validation-valid").removeClass("field-validation-error").removeData("unobtrusiveContainer").find(">*").removeData("unobtrusiveContainer")}}function u(e){var n=a(e),t=n.data(v),r=a.proxy(l,e),i=f.unobtrusive.options||{},u=function(n,t){var r=i[n];r&&a.isFunction(r)&&r.apply(e,t)};return t||(t={options:{errorClass:i.errorClass||"input-validation-error",errorElement:i.errorElement||"span",errorPlacement:function(){o.apply(e,arguments),u("errorPlacement",arguments)},invalidHandler:function(){d.apply(e,arguments),u("invalidHandler",arguments)},messages:{},rules:{},success:function(){s.apply(e,arguments),u("success",arguments)}},attachValidation:function(){n.off("reset."+v,r).on("reset."+v,r).validate(this.options)},validate:function(){return n.validate(),n.valid()}},n.data(v,t)),t}var m,f=a.validator,v="unobtrusiveValidation";return f.unobtrusive={adapters:[],parseElement:function(e,n){var t,r,i,o=a(e),d=o.parents("form")[0];d&&(t=u(d),t.options.rules[e.name]=r={},t.options.messages[e.name]=i={},a.each(this.adapters,function(){var n="data-val-"+this.name,t=o.attr(n),s={};void 0!==t&&(n+="-",a.each(this.params,function(){s[this]=o.attr(n+this)}),this.adapt({element:e,form:d,message:t,params:s,rules:r,messages:i}))}),a.extend(r,{__dummy__:!0}),n||t.attachValidation())},parse:function(e){var n=a(e),t=n.parents().addBack().filter("form").add(n.find("form")).has("[data-val=true]");n.find("[data-val=true]").each(function(){f.unobtrusive.parseElement(this,!0)}),t.each(function(){var a=u(this);a&&a.attachValidation()})}},m=f.unobtrusive.adapters,m.add=function(a,e,n){return n||(n=e,e=[]),this.push({name:a,params:e,adapt:n}),this},m.addBool=function(a,n){return this.add(a,function(t){e(t,n||a,!0)})},m.addMinMax=function(a,n,t,r,i,o){return this.add(a,[i||"min",o||"max"],function(a){var i=a.params.min,o=a.params.max;i&&o?e(a,r,[i,o]):i?e(a,n,i):o&&e(a,t,o)})},m.addSingleVal=function(a,n,t){return this.add(a,[n||"val"],function(r){e(r,t||a,r.params[n])})},f.addMethod("__dummy__",function(a,e,n){return!0}),f.addMethod("regex",function(a,e,n){var t;return!!this.optional(e)||(t=new RegExp(n).exec(a),t&&0===t.index&&t[0].length===a.length)}),f.addMethod("nonalphamin",function(a,e,n){var t;return n&&(t=a.match(/\W/g),t=t&&t.length>=n),t}),f.methods.extension?(m.addSingleVal("accept","mimtype"),m.addSingleVal("extension","extension")):m.addSingleVal("extension","extension","accept"),m.addSingleVal("regex","pattern"),m.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url"),m.addMinMax("length","minlength","maxlength","rangelength").addMinMax("range","min","max","range"),m.addMinMax("minlength","minlength").addMinMax("maxlength","minlength","maxlength"),m.add("equalto",["other"],function(n){var o=r(n.element.name),d=n.params.other,s=i(d,o),l=a(n.form).find(":input").filter("[name='"+t(s)+"']")[0];e(n,"equalTo",l)}),m.add("required",function(a){"INPUT"===a.element.tagName.toUpperCase()&&"CHECKBOX"===a.element.type.toUpperCase()||e(a,"required",!0)}),m.add("remote",["url","type","additionalfields"],function(o){var d={url:o.params.url,type:o.params.type||"GET",data:{}},s=r(o.element.name);a.each(n(o.params.additionalfields||o.element.name),function(e,n){var r=i(n,s);d.data[r]=function(){var e=a(o.form).find(":input").filter("[name='"+t(r)+"']");return e.is(":checkbox")?e.filter(":checked").val()||e.filter(":hidden").val()||"":e.is(":radio")?e.filter(":checked").val()||"":e.val()}}),e(o,"remote",d)}),m.add("password",["min","nonalphamin","regex"],function(a){a.params.min&&e(a,"minlength",a.params.min),a.params.nonalphamin&&e(a,"nonalphamin",a.params.nonalphamin),a.params.regex&&e(a,"regex",a.params.regex)}),m.add("fileextensions",["extensions"],function(a){e(a,"extension",a.params.extensions)}),a(function(){f.unobtrusive.parse(document)}),f.unobtrusive}); -------------------------------------------------------------------------------- /WebAppPages/wwwroot/lib/jquery-validation/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | ===================== 3 | 4 | Copyright Jörn Zaefferer 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /WebAppPages/wwwroot/lib/jquery/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright JS Foundation and other contributors, https://js.foundation/ 2 | 3 | This software consists of voluntary contributions made by many 4 | individuals. For exact contribution history, see the revision history 5 | available at https://github.com/jquery/jquery 6 | 7 | The following license applies to all parts of this software except as 8 | documented below: 9 | 10 | ==== 11 | 12 | Permission is hereby granted, free of charge, to any person obtaining 13 | a copy of this software and associated documentation files (the 14 | "Software"), to deal in the Software without restriction, including 15 | without limitation the rights to use, copy, modify, merge, publish, 16 | distribute, sublicense, and/or sell copies of the Software, and to 17 | permit persons to whom the Software is furnished to do so, subject to 18 | the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be 21 | included in all copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | 31 | ==== 32 | 33 | All files located in the node_modules and external directories are 34 | externally maintained libraries used by this software which have their 35 | own licenses; we recommend you read them, as their terms may differ from 36 | the terms above. 37 | -------------------------------------------------------------------------------- /WebAppsWithSharedLib.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29609.76 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebAppMvc", "WebAppMvc\WebAppMvc.csproj", "{2A769DE8-A4F7-4E34-B640-18E2DA6F4F35}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebAppBlazor", "WebAppBlazor\WebAppBlazor.csproj", "{CA4C81E5-7E13-4497-AC63-624C6C8F2030}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharedLib", "SharedLib\SharedLib.csproj", "{DB22A14F-630E-4941-BF21-765912B18629}" 11 | EndProject 12 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebAppPages", "WebAppPages\WebAppPages.csproj", "{6AEF1158-572B-45ED-9162-9BB57ADD5B9C}" 13 | EndProject 14 | Global 15 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 16 | Debug|Any CPU = Debug|Any CPU 17 | Release|Any CPU = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 20 | {2A769DE8-A4F7-4E34-B640-18E2DA6F4F35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {2A769DE8-A4F7-4E34-B640-18E2DA6F4F35}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {2A769DE8-A4F7-4E34-B640-18E2DA6F4F35}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 | {2A769DE8-A4F7-4E34-B640-18E2DA6F4F35}.Release|Any CPU.Build.0 = Release|Any CPU 24 | {CA4C81E5-7E13-4497-AC63-624C6C8F2030}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 25 | {CA4C81E5-7E13-4497-AC63-624C6C8F2030}.Debug|Any CPU.Build.0 = Debug|Any CPU 26 | {CA4C81E5-7E13-4497-AC63-624C6C8F2030}.Release|Any CPU.ActiveCfg = Release|Any CPU 27 | {CA4C81E5-7E13-4497-AC63-624C6C8F2030}.Release|Any CPU.Build.0 = Release|Any CPU 28 | {DB22A14F-630E-4941-BF21-765912B18629}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 29 | {DB22A14F-630E-4941-BF21-765912B18629}.Debug|Any CPU.Build.0 = Debug|Any CPU 30 | {DB22A14F-630E-4941-BF21-765912B18629}.Release|Any CPU.ActiveCfg = Release|Any CPU 31 | {DB22A14F-630E-4941-BF21-765912B18629}.Release|Any CPU.Build.0 = Release|Any CPU 32 | {6AEF1158-572B-45ED-9162-9BB57ADD5B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 33 | {6AEF1158-572B-45ED-9162-9BB57ADD5B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU 34 | {6AEF1158-572B-45ED-9162-9BB57ADD5B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU 35 | {6AEF1158-572B-45ED-9162-9BB57ADD5B9C}.Release|Any CPU.Build.0 = Release|Any CPU 36 | EndGlobalSection 37 | GlobalSection(SolutionProperties) = preSolution 38 | HideSolutionNode = FALSE 39 | EndGlobalSection 40 | GlobalSection(ExtensibilityGlobals) = postSolution 41 | SolutionGuid = {8A311C9B-0CF6-408D-8367-0C9EF2F6C83A} 42 | EndGlobalSection 43 | EndGlobal 44 | --------------------------------------------------------------------------------