();
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/Backend/bundleconfig.json:
--------------------------------------------------------------------------------
1 | // Configure bundling and minification for the project.
2 | // More info at https://go.microsoft.com/fwlink/?LinkId=808241
3 | [
4 | {
5 | "outputFileName": "wwwroot/css/site.min.css",
6 | // An array of relative input file paths. Globbing patterns supported
7 | "inputFiles": [
8 | "wwwroot/css/site.css"
9 | ]
10 | },
11 | {
12 | "outputFileName": "wwwroot/js/site.min.js",
13 | "inputFiles": [
14 | "wwwroot/js/site.js"
15 | ],
16 | // Optionally specify minification options
17 | "minify": {
18 | "enabled": true,
19 | "renameLocals": true
20 | },
21 | // Optionally generate .map file
22 | "sourceMap": false
23 | }
24 | ]
25 |
--------------------------------------------------------------------------------
/src/Frontend/bundleconfig.json:
--------------------------------------------------------------------------------
1 | // Configure bundling and minification for the project.
2 | // More info at https://go.microsoft.com/fwlink/?LinkId=808241
3 | [
4 | {
5 | "outputFileName": "wwwroot/css/site.min.css",
6 | // An array of relative input file paths. Globbing patterns supported
7 | "inputFiles": [
8 | "wwwroot/css/site.css"
9 | ]
10 | },
11 | {
12 | "outputFileName": "wwwroot/js/site.min.js",
13 | "inputFiles": [
14 | "wwwroot/js/site.js"
15 | ],
16 | // Optionally specify minification options
17 | "minify": {
18 | "enabled": true,
19 | "renameLocals": true
20 | },
21 | // Optionally generate .map file
22 | "sourceMap": false
23 | }
24 | ]
25 |
--------------------------------------------------------------------------------
/src/Backend/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "iisSettings": {
3 | "windowsAuthentication": false,
4 | "anonymousAuthentication": true,
5 | "iisExpress": {
6 | "applicationUrl": "http://localhost:7251/",
7 | "sslPort": 0
8 | }
9 | },
10 | "profiles": {
11 | "IIS Express": {
12 | "commandName": "IISExpress",
13 | "launchBrowser": true,
14 | "environmentVariables": {
15 | "ASPNETCORE_ENVIRONMENT": "Development"
16 | }
17 | },
18 | "Backend": {
19 | "commandName": "Project",
20 | "launchBrowser": true,
21 | "environmentVariables": {
22 | "ASPNETCORE_ENVIRONMENT": "Development"
23 | },
24 | "applicationUrl": "http://localhost:7252/"
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/Frontend/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "iisSettings": {
3 | "windowsAuthentication": false,
4 | "anonymousAuthentication": true,
5 | "iisExpress": {
6 | "applicationUrl": "http://localhost:7858/",
7 | "sslPort": 0
8 | }
9 | },
10 | "profiles": {
11 | "IIS Express": {
12 | "commandName": "IISExpress",
13 | "launchBrowser": true,
14 | "environmentVariables": {
15 | "ASPNETCORE_ENVIRONMENT": "Development"
16 | }
17 | },
18 | "Frontend": {
19 | "commandName": "Project",
20 | "launchBrowser": true,
21 | "environmentVariables": {
22 | "ASPNETCORE_ENVIRONMENT": "Development"
23 | },
24 | "applicationUrl": "http://localhost:7859/"
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/Frontend/Views/People/Details.cshtml:
--------------------------------------------------------------------------------
1 | @model Entities.Person
2 |
3 | @{
4 | ViewData["Title"] = "Details";
5 | }
6 |
7 | Details
8 |
9 |
10 |
Person
11 |
12 |
13 |
14 | @Html.DisplayNameFor(model => model.Name)
15 |
16 |
17 | @Html.DisplayFor(model => model.Name)
18 |
19 |
20 | @Html.DisplayNameFor(model => model.Email)
21 |
22 |
23 | @Html.DisplayFor(model => model.Email)
24 |
25 |
26 |
27 |
31 |
--------------------------------------------------------------------------------
/src/docker-compose.dcproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 2.1
5 | Linux
6 | b2516b42-6f62-4ba7-9292-86ff3eefc5a0
7 | LaunchBrowser
8 | {Scheme}://localhost:{ServicePort}
9 | backend
10 |
11 |
12 |
13 | docker-compose.yml
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/src/Backend/wwwroot/css/site.css:
--------------------------------------------------------------------------------
1 | body {
2 | padding-top: 50px;
3 | padding-bottom: 20px;
4 | }
5 |
6 | /* Wrapping element */
7 | /* Set some basic padding to keep content from hitting the edges */
8 | .body-content {
9 | padding-left: 15px;
10 | padding-right: 15px;
11 | }
12 |
13 | /* Carousel */
14 | .carousel-caption p {
15 | font-size: 20px;
16 | line-height: 1.4;
17 | }
18 |
19 | /* Make .svg files in the carousel display properly in older browsers */
20 | .carousel-inner .item img[src$=".svg"] {
21 | width: 100%;
22 | }
23 |
24 | /* QR code generator */
25 | #qrCode {
26 | margin: 15px;
27 | }
28 |
29 | /* Hide/rearrange for smaller screens */
30 | @media screen and (max-width: 767px) {
31 | /* Hide captions */
32 | .carousel-caption {
33 | display: none;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/Frontend/wwwroot/css/site.css:
--------------------------------------------------------------------------------
1 | body {
2 | padding-top: 50px;
3 | padding-bottom: 20px;
4 | }
5 |
6 | /* Wrapping element */
7 | /* Set some basic padding to keep content from hitting the edges */
8 | .body-content {
9 | padding-left: 15px;
10 | padding-right: 15px;
11 | }
12 |
13 | /* Carousel */
14 | .carousel-caption p {
15 | font-size: 20px;
16 | line-height: 1.4;
17 | }
18 |
19 | /* Make .svg files in the carousel display properly in older browsers */
20 | .carousel-inner .item img[src$=".svg"] {
21 | width: 100%;
22 | }
23 |
24 | /* QR code generator */
25 | #qrCode {
26 | margin: 15px;
27 | }
28 |
29 | /* Hide/rearrange for smaller screens */
30 | @media screen and (max-width: 767px) {
31 | /* Hide captions */
32 | .carousel-caption {
33 | display: none;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/Frontend/Views/People/Delete.cshtml:
--------------------------------------------------------------------------------
1 | @model Entities.Person
2 |
3 | @{
4 | ViewData["Title"] = "Delete";
5 | }
6 |
7 | Delete
8 |
9 | Are you sure you want to delete this?
10 |
11 |
Person
12 |
13 |
14 |
15 | @Html.DisplayNameFor(model => model.Name)
16 |
17 |
18 | @Html.DisplayFor(model => model.Name)
19 |
20 |
21 | @Html.DisplayNameFor(model => model.Email)
22 |
23 |
24 | @Html.DisplayFor(model => model.Email)
25 |
26 |
27 |
28 |
33 |
34 |
--------------------------------------------------------------------------------
/src/Frontend/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 | Development environment should not be enabled in deployed applications , as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment can be enabled by setting the ASPNETCORE_ENVIRONMENT environment variable to Development , and restarting the application.
22 |
23 |
--------------------------------------------------------------------------------
/src/Frontend/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 Frontend.Models;
8 |
9 | namespace Frontend.Controllers
10 | {
11 | public class HomeController : Controller
12 | {
13 | public IActionResult Index()
14 | {
15 | return View();
16 | }
17 |
18 | public IActionResult About()
19 | {
20 | ViewData["Message"] = Environment.OSVersion.ToString();
21 |
22 | return View();
23 | }
24 |
25 | public IActionResult Contact()
26 | {
27 | ViewData["Message"] = "Your contact page.";
28 |
29 | return View();
30 | }
31 |
32 | public IActionResult Error()
33 | {
34 | return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/Frontend/Frontend.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp2.1
5 | ..\docker-compose.dcproj
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/src/Backend/wwwroot/lib/jquery-validation/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "jquery-validation",
3 | "homepage": "http://jqueryvalidation.org/",
4 | "repository": {
5 | "type": "git",
6 | "url": "git://github.com/jzaefferer/jquery-validation.git"
7 | },
8 | "authors": [
9 | "Jörn Zaefferer "
10 | ],
11 | "description": "Form validation made easy",
12 | "main": "dist/jquery.validate.js",
13 | "keywords": [
14 | "forms",
15 | "validation",
16 | "validate"
17 | ],
18 | "license": "MIT",
19 | "ignore": [
20 | "**/.*",
21 | "node_modules",
22 | "bower_components",
23 | "test",
24 | "demo",
25 | "lib"
26 | ],
27 | "dependencies": {
28 | "jquery": ">= 1.7.2"
29 | },
30 | "version": "1.14.0",
31 | "_release": "1.14.0",
32 | "_resolution": {
33 | "type": "version",
34 | "tag": "1.14.0",
35 | "commit": "c1343fb9823392aa9acbe1c3ffd337b8c92fed48"
36 | },
37 | "_source": "git://github.com/jzaefferer/jquery-validation.git",
38 | "_target": ">=1.8",
39 | "_originalSource": "jquery-validation"
40 | }
--------------------------------------------------------------------------------
/src/Frontend/wwwroot/lib/jquery-validation/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "jquery-validation",
3 | "homepage": "http://jqueryvalidation.org/",
4 | "repository": {
5 | "type": "git",
6 | "url": "git://github.com/jzaefferer/jquery-validation.git"
7 | },
8 | "authors": [
9 | "Jörn Zaefferer "
10 | ],
11 | "description": "Form validation made easy",
12 | "main": "dist/jquery.validate.js",
13 | "keywords": [
14 | "forms",
15 | "validation",
16 | "validate"
17 | ],
18 | "license": "MIT",
19 | "ignore": [
20 | "**/.*",
21 | "node_modules",
22 | "bower_components",
23 | "test",
24 | "demo",
25 | "lib"
26 | ],
27 | "dependencies": {
28 | "jquery": ">= 1.7.2"
29 | },
30 | "version": "1.14.0",
31 | "_release": "1.14.0",
32 | "_resolution": {
33 | "type": "version",
34 | "tag": "1.14.0",
35 | "commit": "c1343fb9823392aa9acbe1c3ffd337b8c92fed48"
36 | },
37 | "_source": "git://github.com/jzaefferer/jquery-validation.git",
38 | "_target": ">=1.8",
39 | "_originalSource": "jquery-validation"
40 | }
--------------------------------------------------------------------------------
/src/Backend/wwwroot/lib/bootstrap/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "bootstrap",
3 | "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.",
4 | "keywords": [
5 | "css",
6 | "js",
7 | "less",
8 | "mobile-first",
9 | "responsive",
10 | "front-end",
11 | "framework",
12 | "web"
13 | ],
14 | "homepage": "http://getbootstrap.com",
15 | "license": "MIT",
16 | "moduleType": "globals",
17 | "main": [
18 | "less/bootstrap.less",
19 | "dist/js/bootstrap.js"
20 | ],
21 | "ignore": [
22 | "/.*",
23 | "_config.yml",
24 | "CNAME",
25 | "composer.json",
26 | "CONTRIBUTING.md",
27 | "docs",
28 | "js/tests",
29 | "test-infra"
30 | ],
31 | "dependencies": {
32 | "jquery": "1.9.1 - 3"
33 | },
34 | "version": "3.3.7",
35 | "_release": "3.3.7",
36 | "_resolution": {
37 | "type": "version",
38 | "tag": "v3.3.7",
39 | "commit": "0b9c4a4007c44201dce9a6cc1a38407005c26c86"
40 | },
41 | "_source": "https://github.com/twbs/bootstrap.git",
42 | "_target": "v3.3.7",
43 | "_originalSource": "bootstrap",
44 | "_direct": true
45 | }
--------------------------------------------------------------------------------
/src/Frontend/wwwroot/lib/bootstrap/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "bootstrap",
3 | "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.",
4 | "keywords": [
5 | "css",
6 | "js",
7 | "less",
8 | "mobile-first",
9 | "responsive",
10 | "front-end",
11 | "framework",
12 | "web"
13 | ],
14 | "homepage": "http://getbootstrap.com",
15 | "license": "MIT",
16 | "moduleType": "globals",
17 | "main": [
18 | "less/bootstrap.less",
19 | "dist/js/bootstrap.js"
20 | ],
21 | "ignore": [
22 | "/.*",
23 | "_config.yml",
24 | "CNAME",
25 | "composer.json",
26 | "CONTRIBUTING.md",
27 | "docs",
28 | "js/tests",
29 | "test-infra"
30 | ],
31 | "dependencies": {
32 | "jquery": "1.9.1 - 3"
33 | },
34 | "version": "3.3.7",
35 | "_release": "3.3.7",
36 | "_resolution": {
37 | "type": "version",
38 | "tag": "v3.3.7",
39 | "commit": "0b9c4a4007c44201dce9a6cc1a38407005c26c86"
40 | },
41 | "_source": "https://github.com/twbs/bootstrap.git",
42 | "_target": "v3.3.7",
43 | "_originalSource": "bootstrap",
44 | "_direct": true
45 | }
--------------------------------------------------------------------------------
/src/Backend/wwwroot/lib/bootstrap/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2011-2016 Twitter, Inc.
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.
22 |
--------------------------------------------------------------------------------
/src/Frontend/Views/People/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 |
16 | @Html.DisplayNameFor(model => model.Name)
17 |
18 |
19 | @Html.DisplayNameFor(model => model.Email)
20 |
21 |
22 |
23 |
24 |
25 | @foreach (var item in Model) {
26 |
27 |
28 | @Html.DisplayFor(modelItem => item.Name)
29 |
30 |
31 | @Html.DisplayFor(modelItem => item.Email)
32 |
33 |
34 | Edit |
35 | Details |
36 | Delete
37 |
38 |
39 | }
40 |
41 |
42 |
--------------------------------------------------------------------------------
/src/Frontend/wwwroot/lib/bootstrap/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2011-2016 Twitter, Inc.
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.
22 |
--------------------------------------------------------------------------------
/src/Backend/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 |
--------------------------------------------------------------------------------
/src/Frontend/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 |
--------------------------------------------------------------------------------
/src/Deploy/AksDemoResources.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.27703.2026
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{151D2E53-A2C4-4D7D-83FE-D05416EBD58E}") = "AksDemoResources", "AksDemoResources\AksDemoResources.deployproj", "{A0C33858-B615-4E5B-AC11-9F1325EDF607}"
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 | {A0C33858-B615-4E5B-AC11-9F1325EDF607}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {A0C33858-B615-4E5B-AC11-9F1325EDF607}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {A0C33858-B615-4E5B-AC11-9F1325EDF607}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {A0C33858-B615-4E5B-AC11-9F1325EDF607}.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 = {70C32DA1-CF29-4D22-8567-1DE758DB7E3C}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/src/Frontend/Views/Shared/_ValidationScriptsPartial.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
12 |
18 |
19 |
--------------------------------------------------------------------------------
/src/Frontend/Views/People/Create.cshtml:
--------------------------------------------------------------------------------
1 | @model Entities.Person
2 |
3 | @{
4 | ViewData["Title"] = "Create";
5 | }
6 |
7 | Create
8 |
9 | Person
10 |
11 |
31 |
32 |
35 |
36 | @section Scripts {
37 | @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
38 | }
39 |
--------------------------------------------------------------------------------
/src/Backend/wwwroot/lib/jquery-validation-unobtrusive/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "jquery-validation-unobtrusive",
3 | "version": "3.2.6",
4 | "homepage": "https://github.com/aspnet/jquery-validation-unobtrusive",
5 | "description": "Add-on to jQuery Validation to enable unobtrusive validation options in data-* attributes.",
6 | "main": [
7 | "jquery.validate.unobtrusive.js"
8 | ],
9 | "ignore": [
10 | "**/.*",
11 | "*.json",
12 | "*.md",
13 | "*.txt",
14 | "gulpfile.js"
15 | ],
16 | "keywords": [
17 | "jquery",
18 | "asp.net",
19 | "mvc",
20 | "validation",
21 | "unobtrusive"
22 | ],
23 | "authors": [
24 | "Microsoft"
25 | ],
26 | "license": "http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm",
27 | "repository": {
28 | "type": "git",
29 | "url": "git://github.com/aspnet/jquery-validation-unobtrusive.git"
30 | },
31 | "dependencies": {
32 | "jquery-validation": ">=1.8",
33 | "jquery": ">=1.8"
34 | },
35 | "_release": "3.2.6",
36 | "_resolution": {
37 | "type": "version",
38 | "tag": "v3.2.6",
39 | "commit": "13386cd1b5947d8a5d23a12b531ce3960be1eba7"
40 | },
41 | "_source": "git://github.com/aspnet/jquery-validation-unobtrusive.git",
42 | "_target": "3.2.6",
43 | "_originalSource": "jquery-validation-unobtrusive"
44 | }
--------------------------------------------------------------------------------
/src/Frontend/Views/People/Edit.cshtml:
--------------------------------------------------------------------------------
1 | @model Entities.Person
2 |
3 | @{
4 | ViewData["Title"] = "Edit";
5 | }
6 |
7 | Edit
8 |
9 | Person
10 |
11 |
32 |
33 |
36 |
37 | @section Scripts {
38 | @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
39 | }
40 |
--------------------------------------------------------------------------------
/src/Frontend/wwwroot/lib/jquery-validation-unobtrusive/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "jquery-validation-unobtrusive",
3 | "version": "3.2.6",
4 | "homepage": "https://github.com/aspnet/jquery-validation-unobtrusive",
5 | "description": "Add-on to jQuery Validation to enable unobtrusive validation options in data-* attributes.",
6 | "main": [
7 | "jquery.validate.unobtrusive.js"
8 | ],
9 | "ignore": [
10 | "**/.*",
11 | "*.json",
12 | "*.md",
13 | "*.txt",
14 | "gulpfile.js"
15 | ],
16 | "keywords": [
17 | "jquery",
18 | "asp.net",
19 | "mvc",
20 | "validation",
21 | "unobtrusive"
22 | ],
23 | "authors": [
24 | "Microsoft"
25 | ],
26 | "license": "http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm",
27 | "repository": {
28 | "type": "git",
29 | "url": "git://github.com/aspnet/jquery-validation-unobtrusive.git"
30 | },
31 | "dependencies": {
32 | "jquery-validation": ">=1.8",
33 | "jquery": ">=1.8"
34 | },
35 | "_release": "3.2.6",
36 | "_resolution": {
37 | "type": "version",
38 | "tag": "v3.2.6",
39 | "commit": "13386cd1b5947d8a5d23a12b531ce3960be1eba7"
40 | },
41 | "_source": "git://github.com/aspnet/jquery-validation-unobtrusive.git",
42 | "_target": "3.2.6",
43 | "_originalSource": "jquery-validation-unobtrusive"
44 | }
--------------------------------------------------------------------------------
/src/Frontend/ScaffoldingReadMe.txt:
--------------------------------------------------------------------------------
1 |
2 | ASP.NET MVC core dependencies have been added to the project.
3 | (These dependencies include packages required to enable scaffolding)
4 |
5 | However you may still need to do make changes to your project.
6 |
7 | 1. Suggested changes to Startup class:
8 | 1.1 Add a constructor:
9 | public IConfiguration Configuration { get; }
10 |
11 | public Startup(IConfiguration configuration)
12 | {
13 | Configuration = configuration;
14 | }
15 | 1.2 Add MVC services:
16 | public void ConfigureServices(IServiceCollection services)
17 | {
18 | // Add framework services.
19 | services.AddMvc();
20 | }
21 |
22 | 1.3 Configure web app to use use Configuration and use MVC routing:
23 |
24 | public void Configure(IApplicationBuilder app, IHostingEnvironment env)
25 | {
26 | if (env.IsDevelopment())
27 | {
28 | app.UseDeveloperExceptionPage();
29 | }
30 | else
31 | {
32 | app.UseExceptionHandler("/Home/Error");
33 | }
34 |
35 | app.UseStaticFiles();
36 |
37 | app.UseMvc(routes =>
38 | {
39 | routes.MapRoute(
40 | name: "default",
41 | template: "{controller=Home}/{action=Index}/{id?}");
42 | });
43 | }
44 |
--------------------------------------------------------------------------------
/src/Deploy/AksDemoResources/AksDemoResources.deployproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 |
8 |
9 | Release
10 | AnyCPU
11 |
12 |
13 |
14 | a0c33858-b615-4e5b-ac11-9f1325edf607
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | False
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/src/Backend/wwwroot/lib/jquery/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright jQuery Foundation and other contributors, https://jquery.org/
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 |
--------------------------------------------------------------------------------
/src/Frontend/wwwroot/lib/jquery/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright jQuery Foundation and other contributors, https://jquery.org/
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 |
--------------------------------------------------------------------------------
/src/Backend/Startup.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Builder;
2 | using Microsoft.AspNetCore.Hosting;
3 | using Microsoft.AspNetCore.Mvc;
4 | using Microsoft.Extensions.Configuration;
5 | using Microsoft.Extensions.DependencyInjection;
6 | using MongoDB.Driver;
7 |
8 | namespace Backend
9 | {
10 | public class Startup
11 | {
12 | public Startup(IConfiguration configuration)
13 | {
14 | Configuration = configuration;
15 | }
16 |
17 | public IConfiguration Configuration { get; }
18 |
19 | // This method gets called by the runtime. Use this method to add services to the container.
20 | public void ConfigureServices(IServiceCollection services)
21 | {
22 | services.AddMvc()
23 | .SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
24 |
25 | services.AddSingleton(x => new MongoClient(Configuration.GetConnectionString("mongo")));
26 | services.AddTransient(x => x.GetService().GetDatabase("People"));
27 | }
28 |
29 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
30 | public void Configure(IApplicationBuilder app, IHostingEnvironment env)
31 | {
32 | if (env.IsDevelopment())
33 | {
34 | app.UseDeveloperExceptionPage();
35 | }
36 | else
37 | {
38 | app.UseExceptionHandler("/Home/Error");
39 | }
40 |
41 | app.UseStaticFiles();
42 |
43 | app.UseMvc(routes =>
44 | {
45 | routes.MapRoute(
46 | name: "default",
47 | template: "{controller=Home}/{action=Index}/{id?}");
48 | });
49 | }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/src/aks/monitoring.yml:
--------------------------------------------------------------------------------
1 | apiVersion: extensions/v1beta1
2 | kind: DaemonSet
3 | metadata:
4 | name: omsagent
5 | namespace: des-monitoring
6 | spec:
7 | template:
8 | metadata:
9 | labels:
10 | app: omsagent
11 | agentVersion: 1.4.3-174
12 | dockerProviderVersion: 1.0.0-30
13 | spec:
14 | containers:
15 | - name: omsagent
16 | image: "microsoft/oms"
17 | imagePullPolicy: Always
18 | env:
19 | - name: WSID
20 | value: 00761523-9118-4872-a54b-9c2374bd203e
21 | - name: KEY
22 | value: X/ciVv42rjrbVWdEaUZafhQ963TZjpTOyc6lHN2Fs7VSO2Zi/O+G/8YCbBh9h9Lz1u0/NBKDpWSlEAnPErOTEQ==
23 | securityContext:
24 | privileged: true
25 | ports:
26 | - containerPort: 25225
27 | protocol: TCP
28 | - containerPort: 25224
29 | protocol: UDP
30 | volumeMounts:
31 | - mountPath: /var/run/docker.sock
32 | name: docker-sock
33 | - mountPath: /var/log
34 | name: host-log
35 | - mountPath: /var/lib/docker/containers
36 | name: containerlog-path
37 | livenessProbe:
38 | exec:
39 | command:
40 | - /bin/bash
41 | - -c
42 | - ps -ef | grep omsagent | grep -v "grep"
43 | initialDelaySeconds: 60
44 | periodSeconds: 60
45 | nodeSelector:
46 | beta.kubernetes.io/os: linux
47 | # Tolerate a NoSchedule taint on master that ACS Engine sets.
48 | tolerations:
49 | - key: "node-role.kubernetes.io/master"
50 | operator: "Equal"
51 | value: "true"
52 | effect: "NoSchedule"
53 | volumes:
54 | - name: docker-sock
55 | hostPath:
56 | path: /var/run/docker.sock
57 | - name: container-hostname
58 | hostPath:
59 | path: /etc/hostname
60 | - name: host-log
61 | hostPath:
62 | path: /var/log
63 | - name: containerlog-path
64 | hostPath:
65 | path: /var/lib/docker/containers
--------------------------------------------------------------------------------
/src/aks/paas_aks_demo.yml:
--------------------------------------------------------------------------------
1 | apiVersion: apps/v1beta1
2 | kind: Deployment
3 | metadata:
4 | name: backend
5 | spec:
6 | replicas: 1
7 | template:
8 | metadata:
9 | labels:
10 | app: backend
11 | spec:
12 | containers:
13 | - name: backend
14 | image: desdemoregistry.azurecr.io/backend:latest
15 | ports:
16 | - containerPort: 80
17 | env:
18 | - name: ConnectionStrings__mongo
19 | valueFrom:
20 | secretKeyRef:
21 | key: connectionstring
22 | name: aksdemocosmos
23 | ---
24 | apiVersion: apps/v1beta1
25 | kind: Deployment
26 | metadata:
27 | name: frontend
28 | spec:
29 | replicas: 3
30 | template:
31 | metadata:
32 | labels:
33 | app: frontend
34 | spec:
35 | containers:
36 | - name: frontend
37 | image: desdemoregistry.azurecr.io/frontend:latest
38 | ports:
39 | - containerPort: 80
40 | env:
41 | - name: cache__redis
42 | valueFrom:
43 | secretKeyRef:
44 | key: connectionstring
45 | name: aksdemoredis
46 | - name: ASPNETCORE_ENVIRONMENT
47 | value: "Development"
48 | - name: isInCluster
49 | value: "true"
50 | ---
51 | apiVersion: apps/v1beta1
52 | kind: Deployment
53 | metadata:
54 | name: webserver
55 | spec:
56 | replicas: 1
57 | template:
58 | metadata:
59 | labels:
60 | app: webserver
61 | spec:
62 | containers:
63 | - name: webserver
64 | image: desdemoregistry.azurecr.io/webserver:latest
65 | ports:
66 | - containerPort: 80
67 | ---
68 | apiVersion: v1
69 | kind: Service
70 | metadata:
71 | name: backend
72 | spec:
73 | ports:
74 | - port: 80
75 | selector:
76 | app: backend
77 | ---
78 | apiVersion: v1
79 | kind: Service
80 | metadata:
81 | name: frontend
82 | spec:
83 | ports:
84 | - port: 80
85 | selector:
86 | app: frontend
87 | ---
88 | apiVersion: v1
89 | kind: Service
90 | metadata:
91 | name: webserver
92 | spec:
93 | type: LoadBalancer
94 | ports:
95 | - port: 80
96 | selector:
97 | app: webserver
--------------------------------------------------------------------------------
/src/Deploy/AksDemoResources/Deploy-AzureResourceGroup.ps1:
--------------------------------------------------------------------------------
1 | #Requires -Version 3.0
2 |
3 | Param(
4 | [string] [Parameter(Mandatory=$true)] $ResourceGroupLocation,
5 | [string] $ResourceGroupName = 'AksDemoResources',
6 | [string] $TemplateFile = 'azuredeploy.json'
7 | )
8 |
9 | try {
10 | [Microsoft.Azure.Common.Authentication.AzureSession]::ClientFactory.AddUserAgent("VSAzureTools-$UI$($host.name)".replace(' ','_'), '3.0.0')
11 | } catch { }
12 |
13 | $ErrorActionPreference = 'Stop'
14 | Set-StrictMode -Version 3
15 |
16 | $OptionalParameters = New-Object -TypeName Hashtable
17 |
18 | $TemplateFile = [System.IO.Path]::GetFullPath([System.IO.Path]::Combine($PSScriptRoot, $TemplateFile))
19 |
20 | # Create or update the resource group using the specified template file and template parameters file
21 | New-AzureRmResourceGroup `
22 | -Name $ResourceGroupName `
23 | -Location $ResourceGroupLocation `
24 | -Verbose `
25 | -Force
26 |
27 | $deployment = New-AzureRmResourceGroupDeployment -Name ((Get-ChildItem $TemplateFile).BaseName + '-' + ((Get-Date).ToUniversalTime()).ToString('MMdd-HHmm')) `
28 | -ResourceGroupName $ResourceGroupName `
29 | -TemplateFile $TemplateFile `
30 | @OptionalParameters `
31 | -Force -Verbose `
32 | -ErrorVariable ErrorMessages
33 |
34 | if ($ErrorMessages) {
35 | Write-Output '', 'Template deployment returned the following errors:', @(@($ErrorMessages) | ForEach-Object { $_.Exception.Message.TrimEnd("`r`n") })
36 | }
37 |
38 | function ToBase64($Text)
39 | {
40 | $Bytes = [System.Text.Encoding]::Ascii.GetBytes($Text)
41 | $EncodedText =[Convert]::ToBase64String($Bytes)
42 | return $EncodedText
43 | }
44 |
45 | $CosmosDbConnectionString = ToBase64($deployment.Outputs.cosmosDbConnectionString.Value)
46 | $RedisConnectionString = ToBase64($deployment.Outputs.redisConnectionString.Value)
47 |
48 | Write-Host "##vso[task.setvariable variable=CosmosDbConnectionString;]$CosmosDbConnectionString"
49 | Write-Host "##vso[task.setvariable variable=RedisConnectionString;]$RedisConnectionString"
--------------------------------------------------------------------------------
/src/Backend/Controllers/PeopleController.cs:
--------------------------------------------------------------------------------
1 | using Entities;
2 | using Microsoft.AspNetCore.Mvc;
3 | using MongoDB.Bson;
4 | using MongoDB.Driver;
5 | using MongoDB.Driver.Linq;
6 | using System.Collections.Generic;
7 | using System.Linq;
8 | using System.Threading.Tasks;
9 |
10 | // For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
11 |
12 | namespace Backend.Controllers
13 | {
14 | [Route("api/[controller]")]
15 | public class PeopleController : Controller
16 | {
17 | private IMongoDatabase _db;
18 | private IMongoCollection _people;
19 |
20 | public PeopleController(IMongoDatabase database)
21 | {
22 | _db = database;
23 | _people = database.GetCollection("People");
24 | }
25 |
26 | // GET: api/values
27 | [HttpGet]
28 | public async Task> Get()
29 | {
30 | return await _people.AsQueryable().ToListAsync();
31 | }
32 |
33 | // GET api/values/5
34 | [HttpGet("{id}")]
35 | public async Task Get(string id)
36 | {
37 | var result = await _people.AsQueryable()
38 | .Where(x => x.Id == id)
39 | .SingleOrDefaultAsync();
40 |
41 | if (result == null)
42 | return NotFound();
43 |
44 | return new ObjectResult(result);
45 | }
46 |
47 | // POST api/values
48 | [HttpPost]
49 | public async Task Post([FromBody]Person person)
50 | {
51 | person.Id = ObjectId.GenerateNewId().ToString();
52 | await _people.InsertOneAsync(person);
53 |
54 | return person;
55 | }
56 |
57 | // PUT api/values/5
58 | [HttpPut("{id}")]
59 | public async Task Put(string id, [FromBody]Person person)
60 | {
61 | await _people.ReplaceOneAsync(x => x.Id == id, person);
62 |
63 | return person;
64 | }
65 |
66 | // DELETE api/values/5
67 | [HttpDelete("{id}")]
68 | public async Task Delete(string id)
69 | {
70 | await _people.DeleteOneAsync(x => x.Id == id);
71 | }
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/src/aks/vsts_aks_demo.yml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Namespace
3 | metadata:
4 | name: #{Release.EnvironmentName}#
5 | ---
6 | apiVersion: apps/v1beta1
7 | kind: Deployment
8 | metadata:
9 | name: backend
10 | spec:
11 | replicas: 1
12 | template:
13 | metadata:
14 | labels:
15 | app: backend
16 | spec:
17 | containers:
18 | - name: backend
19 | image: desdemoregistry.azurecr.io/backend:#{Release.Artifacts.Backend.BuildId}#
20 | ports:
21 | - containerPort: 80
22 | env:
23 | - name: ConnectionStrings__mongo
24 | valueFrom:
25 | secretKeyRef:
26 | key: connectionstring
27 | name: aksdemocosmos
28 | ---
29 | apiVersion: apps/v1beta1
30 | kind: Deployment
31 | metadata:
32 | name: frontend
33 | spec:
34 | replicas: 3
35 | template:
36 | metadata:
37 | labels:
38 | app: frontend
39 | spec:
40 | containers:
41 | - name: frontend
42 | image: desdemoregistry.azurecr.io/frontend:#{Release.Artifacts.Frontend.BuildId}#
43 | ports:
44 | - containerPort: 80
45 | env:
46 | - name: cache__redis
47 | valueFrom:
48 | secretKeyRef:
49 | key: connectionstring
50 | name: aksdemoredis
51 | - name: ASPNETCORE_ENVIRONMENT
52 | value: "Development"
53 | - name: isInCluster
54 | value: "true"
55 | ---
56 | apiVersion: apps/v1beta1
57 | kind: Deployment
58 | metadata:
59 | name: webserver
60 | spec:
61 | replicas: 1
62 | template:
63 | metadata:
64 | labels:
65 | app: webserver
66 | spec:
67 | containers:
68 | - name: webserver
69 | image: desdemoregistry.azurecr.io/webserver:#{Release.Artifacts.WebServer.BuildId}#
70 | ports:
71 | - containerPort: 80
72 | ---
73 | apiVersion: v1
74 | kind: Service
75 | metadata:
76 | name: backend
77 | spec:
78 | ports:
79 | - port: 80
80 | selector:
81 | app: backend
82 | ---
83 | apiVersion: v1
84 | kind: Service
85 | metadata:
86 | name: frontend
87 | spec:
88 | ports:
89 | - port: 80
90 | selector:
91 | app: frontend
92 | ---
93 | apiVersion: v1
94 | kind: Service
95 | metadata:
96 | name: webserver
97 | spec:
98 | type: LoadBalancer
99 | ports:
100 | - port: 80
101 | selector:
102 | app: webserver
--------------------------------------------------------------------------------
/src/Compose.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.26730.3
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Backend", "Backend\Backend.csproj", "{D84FB72D-1CFE-4BC0-9FD1-51257FEC6569}"
7 | EndProject
8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Entities", "Entities\Entities.csproj", "{D4215675-E53A-4855-9415-8F86A36924D8}"
9 | EndProject
10 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Frontend", "Frontend\Frontend.csproj", "{58E1D96B-E2CB-46A1-B4D3-E4EA264A0D71}"
11 | EndProject
12 | Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{B2516B42-6F62-4BA7-9292-86FF3EEFC5A0}"
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 | {D84FB72D-1CFE-4BC0-9FD1-51257FEC6569}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21 | {D84FB72D-1CFE-4BC0-9FD1-51257FEC6569}.Debug|Any CPU.Build.0 = Debug|Any CPU
22 | {D84FB72D-1CFE-4BC0-9FD1-51257FEC6569}.Release|Any CPU.ActiveCfg = Release|Any CPU
23 | {D84FB72D-1CFE-4BC0-9FD1-51257FEC6569}.Release|Any CPU.Build.0 = Release|Any CPU
24 | {D4215675-E53A-4855-9415-8F86A36924D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
25 | {D4215675-E53A-4855-9415-8F86A36924D8}.Debug|Any CPU.Build.0 = Debug|Any CPU
26 | {D4215675-E53A-4855-9415-8F86A36924D8}.Release|Any CPU.ActiveCfg = Release|Any CPU
27 | {D4215675-E53A-4855-9415-8F86A36924D8}.Release|Any CPU.Build.0 = Release|Any CPU
28 | {58E1D96B-E2CB-46A1-B4D3-E4EA264A0D71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
29 | {58E1D96B-E2CB-46A1-B4D3-E4EA264A0D71}.Debug|Any CPU.Build.0 = Debug|Any CPU
30 | {58E1D96B-E2CB-46A1-B4D3-E4EA264A0D71}.Release|Any CPU.ActiveCfg = Release|Any CPU
31 | {58E1D96B-E2CB-46A1-B4D3-E4EA264A0D71}.Release|Any CPU.Build.0 = Release|Any CPU
32 | {B2516B42-6F62-4BA7-9292-86FF3EEFC5A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
33 | {B2516B42-6F62-4BA7-9292-86FF3EEFC5A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
34 | {B2516B42-6F62-4BA7-9292-86FF3EEFC5A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
35 | {B2516B42-6F62-4BA7-9292-86FF3EEFC5A0}.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 = {D17368F5-1099-4F86-8E2A-3598F8F75089}
42 | EndGlobalSection
43 | EndGlobal
44 |
--------------------------------------------------------------------------------
/src/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/src/Frontend/Startup.cs:
--------------------------------------------------------------------------------
1 | using Frontend.Data;
2 | using Microsoft.AspNetCore.Builder;
3 | using Microsoft.AspNetCore.DataProtection;
4 | using Microsoft.AspNetCore.Hosting;
5 | using Microsoft.AspNetCore.Mvc;
6 | using Microsoft.Extensions.Caching.Distributed;
7 | using Microsoft.Extensions.Configuration;
8 | using Microsoft.Extensions.DependencyInjection;
9 | using StackExchange.Redis;
10 |
11 | namespace Frontend
12 | {
13 | public class Startup
14 | {
15 | public Startup(IConfiguration configuration)
16 | {
17 | Configuration = configuration;
18 | }
19 |
20 | public IConfiguration Configuration { get; }
21 |
22 | // This method gets called by the runtime. Use this method to add services to the container.
23 | public void ConfigureServices(IServiceCollection services)
24 | {
25 | services.AddMvc()
26 | .SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
27 |
28 | setupDataProtection(services);
29 |
30 | services.AddDistributedRedisCache(options =>
31 | {
32 | options.InstanceName = "SampleInstance";
33 | options.Configuration = Configuration.GetSection("cache").GetValue("redis");
34 | });
35 |
36 | services.AddSingleton(x => new PeopleService(
37 | Configuration.GetSection("services").GetValue("people"),
38 | x.GetService()));
39 | }
40 |
41 | private void setupDataProtection(IServiceCollection services)
42 | {
43 | if (!Configuration.GetValue("isInCluster"))
44 | return;
45 |
46 | var redis = ConnectionMultiplexer.Connect(Configuration.GetSection("cache").GetValue("redis"));
47 |
48 | services.AddDataProtection()
49 | .SetApplicationName("frontend-test")
50 | .PersistKeysToRedis(redis);
51 | }
52 |
53 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
54 | public void Configure(IApplicationBuilder app, IHostingEnvironment env)
55 | {
56 | if (env.IsDevelopment())
57 | {
58 | app.UseDeveloperExceptionPage();
59 | }
60 | else
61 | {
62 | app.UseExceptionHandler("/Home/Error");
63 | }
64 |
65 | app.UseStaticFiles();
66 |
67 | app.UseMvc(routes =>
68 | {
69 | routes.MapRoute(
70 | name: "default",
71 | template: "{controller=Home}/{action=Index}/{id?}");
72 | });
73 | }
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/src/aks/aks_demo.yml:
--------------------------------------------------------------------------------
1 | apiVersion: apps/v1beta1
2 | kind: Deployment
3 | metadata:
4 | name: composedemodb
5 | spec:
6 | replicas: 1
7 | template:
8 | metadata:
9 | labels:
10 | app: composedemodb
11 | spec:
12 | containers:
13 | - name: composedemodb
14 | image: mongo
15 | ports:
16 | - containerPort: 27017
17 | volumeMounts:
18 | - name: mongo-volume
19 | mountPath: /data/db
20 | volumes:
21 | - name: mongo-volume
22 | persistentVolumeClaim:
23 | claimName: test-pv-claim
24 | ---
25 | apiVersion: apps/v1beta1
26 | kind: Deployment
27 | metadata:
28 | name: composedemoredis
29 | spec:
30 | replicas: 1
31 | template:
32 | metadata:
33 | labels:
34 | app: composedemoredis
35 | spec:
36 | containers:
37 | - name: composedemoredis
38 | image: redis
39 | ports:
40 | - containerPort: 6379
41 | ---
42 | apiVersion: apps/v1beta1
43 | kind: Deployment
44 | metadata:
45 | name: backend
46 | spec:
47 | replicas: 1
48 | template:
49 | metadata:
50 | labels:
51 | app: backend
52 | spec:
53 | containers:
54 | - name: backend
55 | image: desdemoregistry.azurecr.io/backend
56 | ports:
57 | - containerPort: 80
58 | env:
59 | - name: ConnectionStrings__mongo
60 | value: "mongodb://composedemodb"
61 | ---
62 | apiVersion: apps/v1beta1
63 | kind: Deployment
64 | metadata:
65 | name: frontend
66 | spec:
67 | replicas: 3
68 | template:
69 | metadata:
70 | labels:
71 | app: frontend
72 | spec:
73 | containers:
74 | - name: frontend
75 | image: desdemoregistry.azurecr.io/frontend:latest
76 | ports:
77 | - containerPort: 80
78 | env:
79 | - name: cache__redis
80 | value: "composedemoredis"
81 | - name: ASPNETCORE_ENVIRONMENT
82 | value: "Development"
83 | - name: isInCluster
84 | value: "true"
85 | ---
86 | apiVersion: apps/v1beta1
87 | kind: Deployment
88 | metadata:
89 | name: webserver
90 | spec:
91 | replicas: 1
92 | template:
93 | metadata:
94 | labels:
95 | app: webserver
96 | spec:
97 | containers:
98 | - name: webserver
99 | image: desdemoregistry.azurecr.io/webserver
100 | ports:
101 | - containerPort: 80
102 | ---
103 | apiVersion: v1
104 | kind: Service
105 | metadata:
106 | name: composedemodb
107 | spec:
108 | ports:
109 | - port: 27017
110 | selector:
111 | app: composedemodb
112 | ---
113 | apiVersion: v1
114 | kind: Service
115 | metadata:
116 | name: composedemoredis
117 | spec:
118 | ports:
119 | - port: 6379
120 | selector:
121 | app: composedemoredis
122 | ---
123 | apiVersion: v1
124 | kind: Service
125 | metadata:
126 | name: backend
127 | spec:
128 | ports:
129 | - port: 80
130 | selector:
131 | app: backend
132 | ---
133 | apiVersion: v1
134 | kind: Service
135 | metadata:
136 | name: frontend
137 | spec:
138 | ports:
139 | - port: 80
140 | selector:
141 | app: frontend
142 | ---
143 | apiVersion: v1
144 | kind: Service
145 | metadata:
146 | name: webserver
147 | spec:
148 | type: LoadBalancer
149 | ports:
150 | - port: 80
151 | selector:
152 | app: webserver
--------------------------------------------------------------------------------
/src/Frontend/Views/Shared/_Layout.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | @ViewData["Title"] - Frontend
7 |
8 |
9 |
10 |
11 |
12 |
13 |
16 |
17 |
18 |
19 |
20 |
21 |
39 |
40 |
41 | @RenderBody()
42 |
43 |
44 | © 2017 - Frontend
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
60 |
66 |
67 |
68 |
69 | @RenderSection("Scripts", required: false)
70 |
71 |
72 |
--------------------------------------------------------------------------------
/src/Frontend/Data/PeopleService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using Entities;
6 | using System.Net.Http;
7 | using Newtonsoft.Json;
8 | using System.Net.Http.Headers;
9 | using Microsoft.Extensions.Caching.Distributed;
10 |
11 | namespace Frontend.Data
12 | {
13 | public class PeopleService : IPeopleService
14 | {
15 | private string _baseUrl;
16 | private IDistributedCache _cache;
17 |
18 | public PeopleService(string baseUrl, IDistributedCache cache)
19 | {
20 | _baseUrl = baseUrl;
21 | _cache = cache;
22 | }
23 |
24 | public async Task CreateAsync(Person person)
25 | {
26 | var client = new HttpClient();
27 |
28 | var content = new StringContent(JsonConvert.SerializeObject(person));
29 | content.Headers.ContentType = new MediaTypeHeaderValue("application/json");
30 |
31 | var response = await client.PostAsync(_baseUrl, content);
32 | response.EnsureSuccessStatusCode();
33 |
34 | var result = await response.Content.ReadAsStringAsync();
35 | var createdPerson = JsonConvert.DeserializeObject(result);
36 |
37 | await _cache.RemoveAsync("person.all");
38 | await _cache.SetStringAsync($"person.{createdPerson.Id}", result);
39 |
40 | return createdPerson;
41 | }
42 |
43 | public async Task DeleteAsync(string id)
44 | {
45 | var client = new HttpClient();
46 |
47 | var response = await client.DeleteAsync(_baseUrl + "/" + id);
48 | response.EnsureSuccessStatusCode();
49 |
50 | await _cache.RemoveAsync("person.all");
51 | await _cache.RemoveAsync($"person.{id}");
52 | }
53 |
54 | public async Task GetByIdAsync(string id)
55 | {
56 | string result = await _cache.GetStringAsync($"person.{id}");
57 |
58 | if (result == null)
59 | {
60 | var client = new HttpClient();
61 |
62 | var response = await client.GetAsync(_baseUrl + "/" + id);
63 | response.EnsureSuccessStatusCode();
64 |
65 | result = await response.Content.ReadAsStringAsync();
66 |
67 | await _cache.SetStringAsync($"person.{id}", result);
68 | }
69 |
70 | return JsonConvert.DeserializeObject(result);
71 | }
72 |
73 | public async Task> GetListAsync()
74 | {
75 | string result = await _cache.GetStringAsync("person.all");
76 |
77 | if (result == null)
78 | {
79 | var client = new HttpClient();
80 |
81 | var response = await client.GetAsync(_baseUrl);
82 | response.EnsureSuccessStatusCode();
83 |
84 | result = await response.Content.ReadAsStringAsync();
85 |
86 | await _cache.SetStringAsync("person.all", result);
87 | }
88 |
89 | return JsonConvert.DeserializeObject>(result);
90 | }
91 |
92 | public async Task UpdateAsync(Person person)
93 | {
94 | var client = new HttpClient();
95 |
96 | var value = JsonConvert.SerializeObject(person);
97 |
98 | var content = new StringContent(value);
99 | content.Headers.ContentType = new MediaTypeHeaderValue("application/json");
100 |
101 | var response = await client.PutAsync(_baseUrl + "/" + person.Id.ToString(), content);
102 | response.EnsureSuccessStatusCode();
103 |
104 | await _cache.RemoveAsync("person.all");
105 | await _cache.SetStringAsync($"person.{person.Id}", value);
106 | }
107 | }
108 | }
109 |
--------------------------------------------------------------------------------
/src/Deploy/AksDemoResources/azuredeploy.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | /* redis parameters */
6 | "RedisCachePrefix": {
7 | "type": "string",
8 | "minLength": 1,
9 | "defaultValue": "composedemoredis"
10 | },
11 | "RedisCacheSKUName": {
12 | "type": "string",
13 | "allowedValues": [
14 | "Basic",
15 | "Standard"
16 | ],
17 | "defaultValue": "Basic"
18 | },
19 | "RedisCacheSKUFamily": {
20 | "type": "string",
21 | "allowedValues": [
22 | "C"
23 | ],
24 | "defaultValue": "C"
25 | },
26 | "RedisCacheSKUCapacity": {
27 | "type": "int",
28 | "allowedValues": [
29 | 0,
30 | 1,
31 | 2,
32 | 3,
33 | 4,
34 | 5,
35 | 6
36 | ],
37 | "defaultValue": 0
38 | },
39 | "RedisCacheRedisVersion": {
40 | "type": "string",
41 | "allowedValues": [
42 | "2.8"
43 | ],
44 | "defaultValue": "2.8"
45 | },
46 | /* cosmosdb parameters */
47 | "apiType": {
48 | "type": "string",
49 | "metadata": {
50 | "description": "The Azure Cosmos DB API type, by default Cassandra; otherwise one of Gremlin, MongoDB, SQL, or Table"
51 | },
52 | "allowedValues": [
53 | "Cassandra",
54 | "Gremlin",
55 | "MongoDB",
56 | "SQL",
57 | "Table"
58 | ],
59 | "defaultValue": "MongoDB"
60 | },
61 | "databaseAccountPrefix": {
62 | "type": "string",
63 | "metadata": {
64 | "description": "The Azure Cosmos DB account prefix."
65 | },
66 | "defaultValue": "composedemodb"
67 | }
68 | },
69 | "variables": {
70 | "RedisCacheName": "[concat(parameters('RedisCachePrefix'), uniqueString(resourceGroup().id))]",
71 | "CosmosDbName": "[concat(parameters('databaseAccountPrefix'), uniqueString(resourceGroup().id))]",
72 | "CosmosDbOfferType": "Standard"
73 | },
74 | "resources": [
75 | {
76 | "name": "[variables('RedisCacheName')]",
77 | "type": "Microsoft.Cache/Redis",
78 | "location": "[resourceGroup().location]",
79 | "apiVersion": "2016-04-01",
80 | "dependsOn": [],
81 | "tags": {
82 | "displayName": "RedisCache"
83 | },
84 | "properties": {
85 | "sku": {
86 | "name": "[parameters('RedisCacheSKUName')]",
87 | "family": "[parameters('RedisCacheSKUFamily')]",
88 | "capacity": "[parameters('RedisCacheSKUCapacity')]"
89 | },
90 | "redisVersion": "[parameters('RedisCacheRedisVersion')]"
91 | }
92 | },
93 | {
94 | "apiVersion": "2015-04-08",
95 | "type": "Microsoft.DocumentDB/databaseAccounts",
96 | "kind": "[if(equals(parameters('apiType'), 'MongoDB'), 'MongoDB', 'GlobalDocumentDB')]",
97 | "name": "[variables('CosmosDbName')]",
98 | "location": "[resourceGroup().location]",
99 | "properties": {
100 | "name": "[variables('CosmosDbName')]",
101 | "databaseAccountOfferType": "[variables('CosmosDbOfferType')]"
102 | }
103 | }
104 | ],
105 | "outputs": {
106 | "redisConnectionString": {
107 | "type": "string",
108 | "value": "[concat(variables('RedisCacheName'),'.redis.cache.windows.net,abortConnect=false,ssl=true,password=', listKeys(resourceId('Microsoft.Cache/Redis', variables('RedisCacheName')), '2015-08-01').primaryKey)]"
109 | },
110 | "cosmosDbConnectionString": {
111 | "type": "string",
112 | "value": "[concat('mongodb://', variables('CosmosDbName'), ':', listKeys(resourceId('Microsoft.DocumentDb/databaseAccounts', variables('CosmosDbName')), '2015-04-08').primaryMasterKey, '@', variables('CosmosDbName'), '.documents.azure.com:10250/?ssl=true')]"
113 | }
114 | }
115 | }
116 |
--------------------------------------------------------------------------------
/src/Frontend/Controllers/PeopleController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using Microsoft.AspNetCore.Http;
6 | using Microsoft.AspNetCore.Mvc;
7 | using Frontend.Data;
8 | using Entities;
9 |
10 | namespace Frontend.Controllers
11 | {
12 | public class PeopleController : Controller
13 | {
14 | private IPeopleService _people;
15 |
16 | public PeopleController(IPeopleService people)
17 | {
18 | _people = people;
19 | }
20 |
21 | /// GET: People
22 | public async Task Index(string filter)
23 | {
24 | var list = await _people.GetListAsync();
25 |
26 | return View(list);
27 | }
28 |
29 | // GET: People/Details/5
30 | public async Task Details(string id)
31 | {
32 | if (id == null)
33 | {
34 | return NotFound();
35 | }
36 |
37 | var person = await _people.GetByIdAsync(id);
38 |
39 | if (person == null)
40 | {
41 | return NotFound();
42 | }
43 |
44 | return View(person);
45 | }
46 |
47 | // GET: People/Create
48 | public IActionResult Create()
49 | {
50 | return View();
51 | }
52 |
53 | // POST: People/Create
54 | // To protect from overposting attacks, please enable the specific properties you want to bind to, for
55 | // more details see http://go.microsoft.com/fwlink/?LinkId=317598.
56 | [HttpPost]
57 | [ValidateAntiForgeryToken]
58 | public async Task Create([Bind("Name,Email")] Person person)
59 | {
60 | if (ModelState.IsValid)
61 | {
62 | await _people.CreateAsync(person);
63 |
64 | return RedirectToAction(nameof(Index));
65 | }
66 | return View(person);
67 | }
68 |
69 | // GET: People/Edit/5
70 | public async Task Edit(string id)
71 | {
72 | if (id == null)
73 | {
74 | return NotFound();
75 | }
76 |
77 | var person = await _people.GetByIdAsync(id);
78 |
79 | if (person == null)
80 | {
81 | return NotFound();
82 | }
83 | return View(person);
84 | }
85 |
86 | // POST: People/Edit/5
87 | // To protect from overposting attacks, please enable the specific properties you want to bind to, for
88 | // more details see http://go.microsoft.com/fwlink/?LinkId=317598.
89 | [HttpPost]
90 | [ValidateAntiForgeryToken]
91 | public async Task Edit(string id, [Bind("Email")] Person person)
92 | {
93 | var original = await _people.GetByIdAsync(id);
94 |
95 | if (original == null)
96 | {
97 | return this.NotFound();
98 | }
99 |
100 | if (ModelState.IsValid && await this.TryUpdateModelAsync(original))
101 | {
102 | await _people.UpdateAsync(original);
103 |
104 | return RedirectToAction(nameof(Index));
105 | }
106 | return View(person);
107 | }
108 |
109 | // GET: People/Delete/5
110 | public async Task Delete(string id)
111 | {
112 | if (id == null)
113 | {
114 | return NotFound();
115 | }
116 |
117 | var person = await _people.GetByIdAsync(id);
118 |
119 | if (person == null)
120 | {
121 | return NotFound();
122 | }
123 |
124 | return View(person);
125 | }
126 |
127 | // POST: People/Delete/5
128 | [HttpPost, ActionName("Delete")]
129 | [ValidateAntiForgeryToken]
130 | public async Task DeleteConfirmed(string id)
131 | {
132 | await _people.DeleteAsync(id);
133 |
134 | return RedirectToAction(nameof(Index));
135 | }
136 | }
137 | }
--------------------------------------------------------------------------------
/src/Backend/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js:
--------------------------------------------------------------------------------
1 | /*
2 | ** Unobtrusive validation support library for jQuery and jQuery Validate
3 | ** Copyright (C) Microsoft Corporation. All rights reserved.
4 | */
5 | !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 m(e){var n=a(e),t=n.data(v),r=a.proxy(l,e),i=p.unobtrusive.options||{},m=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),m("errorPlacement",arguments)},invalidHandler:function(){d.apply(e,arguments),m("invalidHandler",arguments)},messages:{},rules:{},success:function(){s.apply(e,arguments),m("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 u,p=a.validator,v="unobtrusiveValidation";p.unobtrusive={adapters:[],parseElement:function(e,n){var t,r,i,o=a(e),d=o.parents("form")[0];d&&(t=m(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(){p.unobtrusive.parseElement(this,!0)}),t.each(function(){var a=m(this);a&&a.attachValidation()})}},u=p.unobtrusive.adapters,u.add=function(a,e,n){return n||(n=e,e=[]),this.push({name:a,params:e,adapt:n}),this},u.addBool=function(a,n){return this.add(a,function(t){e(t,n||a,!0)})},u.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)})},u.addSingleVal=function(a,n,t){return this.add(a,[n||"val"],function(r){e(r,t||a,r.params[n])})},p.addMethod("__dummy__",function(a,e,n){return!0}),p.addMethod("regex",function(a,e,n){var t;return this.optional(e)?!0:(t=new RegExp(n).exec(a),t&&0===t.index&&t[0].length===a.length)}),p.addMethod("nonalphamin",function(a,e,n){var t;return n&&(t=a.match(/\W/g),t=t&&t.length>=n),t}),p.methods.extension?(u.addSingleVal("accept","mimtype"),u.addSingleVal("extension","extension")):u.addSingleVal("extension","extension","accept"),u.addSingleVal("regex","pattern"),u.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url"),u.addMinMax("length","minlength","maxlength","rangelength").addMinMax("range","min","max","range"),u.addMinMax("minlength","minlength").addMinMax("maxlength","minlength","maxlength"),u.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)}),u.add("required",function(a){("INPUT"!==a.element.tagName.toUpperCase()||"CHECKBOX"!==a.element.type.toUpperCase())&&e(a,"required",!0)}),u.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)}),u.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)}),a(function(){p.unobtrusive.parse(document)})}(jQuery);
--------------------------------------------------------------------------------
/src/Frontend/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js:
--------------------------------------------------------------------------------
1 | /*
2 | ** Unobtrusive validation support library for jQuery and jQuery Validate
3 | ** Copyright (C) Microsoft Corporation. All rights reserved.
4 | */
5 | !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 m(e){var n=a(e),t=n.data(v),r=a.proxy(l,e),i=p.unobtrusive.options||{},m=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),m("errorPlacement",arguments)},invalidHandler:function(){d.apply(e,arguments),m("invalidHandler",arguments)},messages:{},rules:{},success:function(){s.apply(e,arguments),m("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 u,p=a.validator,v="unobtrusiveValidation";p.unobtrusive={adapters:[],parseElement:function(e,n){var t,r,i,o=a(e),d=o.parents("form")[0];d&&(t=m(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(){p.unobtrusive.parseElement(this,!0)}),t.each(function(){var a=m(this);a&&a.attachValidation()})}},u=p.unobtrusive.adapters,u.add=function(a,e,n){return n||(n=e,e=[]),this.push({name:a,params:e,adapt:n}),this},u.addBool=function(a,n){return this.add(a,function(t){e(t,n||a,!0)})},u.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)})},u.addSingleVal=function(a,n,t){return this.add(a,[n||"val"],function(r){e(r,t||a,r.params[n])})},p.addMethod("__dummy__",function(a,e,n){return!0}),p.addMethod("regex",function(a,e,n){var t;return this.optional(e)?!0:(t=new RegExp(n).exec(a),t&&0===t.index&&t[0].length===a.length)}),p.addMethod("nonalphamin",function(a,e,n){var t;return n&&(t=a.match(/\W/g),t=t&&t.length>=n),t}),p.methods.extension?(u.addSingleVal("accept","mimtype"),u.addSingleVal("extension","extension")):u.addSingleVal("extension","extension","accept"),u.addSingleVal("regex","pattern"),u.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url"),u.addMinMax("length","minlength","maxlength","rangelength").addMinMax("range","min","max","range"),u.addMinMax("minlength","minlength").addMinMax("maxlength","minlength","maxlength"),u.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)}),u.add("required",function(a){("INPUT"!==a.element.tagName.toUpperCase()||"CHECKBOX"!==a.element.type.toUpperCase())&&e(a,"required",!0)}),u.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)}),u.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)}),a(function(){p.unobtrusive.parse(document)})}(jQuery);
--------------------------------------------------------------------------------
/src/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 |
4 | # User-specific files
5 | *.suo
6 | *.user
7 | *.userosscache
8 | *.sln.docstates
9 |
10 | # User-specific files (MonoDevelop/Xamarin Studio)
11 | *.userprefs
12 |
13 | # Build results
14 | [Dd]ebug/
15 | [Dd]ebugPublic/
16 | [Rr]elease/
17 | [Rr]eleases/
18 | x64/
19 | x86/
20 | bld/
21 | [Bb]in/
22 | [Oo]bj/
23 | [Ll]og/
24 |
25 | # Visual Studio 2015 cache/options directory
26 | .vs/
27 | # Uncomment if you have tasks that create the project's static files in wwwroot
28 | #wwwroot/
29 |
30 | # MSTest test Results
31 | [Tt]est[Rr]esult*/
32 | [Bb]uild[Ll]og.*
33 |
34 | # NUNIT
35 | *.VisualState.xml
36 | TestResult.xml
37 |
38 | # Build Results of an ATL Project
39 | [Dd]ebugPS/
40 | [Rr]eleasePS/
41 | dlldata.c
42 |
43 | # DNX
44 | project.lock.json
45 | project.fragment.lock.json
46 | artifacts/
47 |
48 | *_i.c
49 | *_p.c
50 | *_i.h
51 | *.ilk
52 | *.meta
53 | *.obj
54 | *.pch
55 | *.pdb
56 | *.pgc
57 | *.pgd
58 | *.rsp
59 | *.sbr
60 | *.tlb
61 | *.tli
62 | *.tlh
63 | *.tmp
64 | *.tmp_proj
65 | *.log
66 | *.vspscc
67 | *.vssscc
68 | .builds
69 | *.pidb
70 | *.svclog
71 | *.scc
72 |
73 | # Chutzpah Test files
74 | _Chutzpah*
75 |
76 | # Visual C++ cache files
77 | ipch/
78 | *.aps
79 | *.ncb
80 | *.opendb
81 | *.opensdf
82 | *.sdf
83 | *.cachefile
84 | *.VC.db
85 | *.VC.VC.opendb
86 |
87 | # Visual Studio profiler
88 | *.psess
89 | *.vsp
90 | *.vspx
91 | *.sap
92 |
93 | # TFS 2012 Local Workspace
94 | $tf/
95 |
96 | # Guidance Automation Toolkit
97 | *.gpState
98 |
99 | # ReSharper is a .NET coding add-in
100 | _ReSharper*/
101 | *.[Rr]e[Ss]harper
102 | *.DotSettings.user
103 |
104 | # JustCode is a .NET coding add-in
105 | .JustCode
106 |
107 | # TeamCity is a build add-in
108 | _TeamCity*
109 |
110 | # DotCover is a Code Coverage Tool
111 | *.dotCover
112 |
113 | # NCrunch
114 | _NCrunch_*
115 | .*crunch*.local.xml
116 | nCrunchTemp_*
117 |
118 | # MightyMoose
119 | *.mm.*
120 | AutoTest.Net/
121 |
122 | # Web workbench (sass)
123 | .sass-cache/
124 |
125 | # Installshield output folder
126 | [Ee]xpress/
127 |
128 | # DocProject is a documentation generator add-in
129 | DocProject/buildhelp/
130 | DocProject/Help/*.HxT
131 | DocProject/Help/*.HxC
132 | DocProject/Help/*.hhc
133 | DocProject/Help/*.hhk
134 | DocProject/Help/*.hhp
135 | DocProject/Help/Html2
136 | DocProject/Help/html
137 |
138 | # Click-Once directory
139 | publish/
140 |
141 | # Publish Web Output
142 | *.[Pp]ublish.xml
143 | *.azurePubxml
144 | # TODO: Comment the next line if you want to checkin your web deploy settings
145 | # but database connection strings (with potential passwords) will be unencrypted
146 | #*.pubxml
147 | *.publishproj
148 |
149 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
150 | # checkin your Azure Web App publish settings, but sensitive information contained
151 | # in these scripts will be unencrypted
152 | PublishScripts/
153 |
154 | # NuGet Packages
155 | *.nupkg
156 | # The packages folder can be ignored because of Package Restore
157 | **/packages/*
158 | # except build/, which is used as an MSBuild target.
159 | !**/packages/build/
160 | # Uncomment if necessary however generally it will be regenerated when needed
161 | #!**/packages/repositories.config
162 | # NuGet v3's project.json files produces more ignoreable files
163 | *.nuget.props
164 | *.nuget.targets
165 |
166 | # Microsoft Azure Build Output
167 | csx/
168 | *.build.csdef
169 |
170 | # Microsoft Azure Emulator
171 | ecf/
172 | rcf/
173 |
174 | # Windows Store app package directories and files
175 | AppPackages/
176 | BundleArtifacts/
177 | Package.StoreAssociation.xml
178 | _pkginfo.txt
179 |
180 | # Visual Studio cache files
181 | # files ending in .cache can be ignored
182 | *.[Cc]ache
183 | # but keep track of directories ending in .cache
184 | !*.[Cc]ache/
185 |
186 | # Others
187 | ClientBin/
188 | ~$*
189 | *~
190 | *.dbmdl
191 | *.dbproj.schemaview
192 | *.jfm
193 | *.pfx
194 | *.publishsettings
195 | node_modules/
196 | orleans.codegen.cs
197 |
198 | # Since there are multiple workflows, uncomment next line to ignore bower_components
199 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
200 | #bower_components/
201 |
202 | # RIA/Silverlight projects
203 | Generated_Code/
204 |
205 | # Backup & report files from converting an old project file
206 | # to a newer Visual Studio version. Backup files are not needed,
207 | # because we have git ;-)
208 | _UpgradeReport_Files/
209 | Backup*/
210 | UpgradeLog*.XML
211 | UpgradeLog*.htm
212 |
213 | # SQL Server files
214 | *.mdf
215 | *.ldf
216 |
217 | # Business Intelligence projects
218 | *.rdl.data
219 | *.bim.layout
220 | *.bim_*.settings
221 |
222 | # Microsoft Fakes
223 | FakesAssemblies/
224 |
225 | # GhostDoc plugin setting file
226 | *.GhostDoc.xml
227 |
228 | # Node.js Tools for Visual Studio
229 | .ntvs_analysis.dat
230 |
231 | # Visual Studio 6 build log
232 | *.plg
233 |
234 | # Visual Studio 6 workspace options file
235 | *.opt
236 |
237 | # Visual Studio LightSwitch build output
238 | **/*.HTMLClient/GeneratedArtifacts
239 | **/*.DesktopClient/GeneratedArtifacts
240 | **/*.DesktopClient/ModelManifest.xml
241 | **/*.Server/GeneratedArtifacts
242 | **/*.Server/ModelManifest.xml
243 | _Pvt_Extensions
244 |
245 | # Paket dependency manager
246 | .paket/paket.exe
247 | paket-files/
248 |
249 | # FAKE - F# Make
250 | .fake/
251 |
252 | # JetBrains Rider
253 | .idea/
254 | *.sln.iml
255 |
256 | # CodeRush
257 | .cr/
258 |
259 | # Python Tools for Visual Studio (PTVS)
260 | __pycache__/
261 | *.pyc
--------------------------------------------------------------------------------
/src/Frontend/Views/Home/Index.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | ViewData["Title"] = "Home Page";
3 | }
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | Learn how to build ASP.NET apps that can run anywhere.
18 |
19 | Learn More
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | There are powerful new features in Visual Studio for building modern web apps.
29 |
30 | Learn More
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 | Bring in libraries from NuGet, Bower, and npm, and automate tasks using Grunt or Gulp.
40 |
41 | Learn More
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | Learn how Microsoft's Azure cloud platform allows you to build, deploy, and scale web apps.
51 |
52 | Learn More
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 | Previous
61 |
62 |
63 |
64 | Next
65 |
66 |
67 |
68 |
69 |
70 |
Application uses
71 |
72 | Sample pages using ASP.NET Core MVC
73 | Bower for managing client-side libraries
74 | Theming using Bootstrap
75 |
76 |
77 |
88 |
100 |
101 |
Run & Deploy
102 |
107 |
108 |
109 |
--------------------------------------------------------------------------------
/src/Deploy/AksDemoResources/Deployment.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | bin\$(Configuration)\
7 | false
8 | true
9 | false
10 | None
11 | obj\
12 | $(BaseIntermediateOutputPath)\
13 | $(BaseIntermediateOutputPath)$(Configuration)\
14 | $(IntermediateOutputPath)ProjectReferences
15 | $(ProjectReferencesOutputPath)\
16 | true
17 |
18 |
19 |
20 | false
21 | false
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | Always
33 |
34 |
35 | Never
36 |
37 |
38 | false
39 | Build
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | _GetDeploymentProjectContent;
48 | _CalculateContentOutputRelativePaths;
49 | _GetReferencedProjectsOutput;
50 | _CalculateArtifactStagingDirectory;
51 | _CopyOutputToArtifactStagingDirectory;
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 | Configuration=$(Configuration);Platform=$(Platform)
69 |
70 |
71 |
75 |
76 |
77 |
78 | $([System.IO.Path]::GetFileNameWithoutExtension('%(ProjectReference.Identity)'))
79 |
80 |
81 |
82 |
83 |
84 |
85 | $(OutDir)
86 | $(OutputPath)
87 | $(ArtifactStagingDirectory)\
88 | $(ArtifactStagingDirectory)staging\
89 | $(Build_StagingDirectory)
90 |
91 |
92 |
93 |
94 |
96 |
97 | <_OriginalIdentity>%(DeploymentProjectContentOutput.Identity)
98 | <_RelativePath>$(_OriginalIdentity.Replace('$(MSBuildProjectDirectory)', ''))
99 |
100 |
101 |
102 |
103 | $(_RelativePath)
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 | PrepareForRun
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
--------------------------------------------------------------------------------
/src/Backend/wwwroot/images/banner2.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Frontend/wwwroot/images/banner2.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Backend/wwwroot/images/banner1.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Frontend/wwwroot/images/banner1.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Backend/wwwroot/images/banner3.svg:
--------------------------------------------------------------------------------
1 | banner3b
--------------------------------------------------------------------------------
/src/Frontend/wwwroot/images/banner3.svg:
--------------------------------------------------------------------------------
1 | banner3b
--------------------------------------------------------------------------------
/src/Backend/wwwroot/images/banner4.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Frontend/wwwroot/images/banner4.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Backend/wwwroot/lib/jquery-validation/dist/additional-methods.min.js:
--------------------------------------------------------------------------------
1 | /*! jQuery Validation Plugin - v1.14.0 - 6/30/2015
2 | * http://jqueryvalidation.org/
3 | * Copyright (c) 2015 Jörn Zaefferer; Licensed MIT */
4 | !function(a){"function"==typeof define&&define.amd?define(["jquery","./jquery.validate.min"],a):a(jQuery)}(function(a){!function(){function b(a){return a.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}a.validator.addMethod("maxWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length<=d},a.validator.format("Please enter {0} words or less.")),a.validator.addMethod("minWords",function(a,c,d){return this.optional(c)||b(a).match(/\b\w+\b/g).length>=d},a.validator.format("Please enter at least {0} words.")),a.validator.addMethod("rangeWords",function(a,c,d){var e=b(a),f=/\b\w+\b/g;return this.optional(c)||e.match(f).length>=d[0]&&e.match(f).length<=d[1]},a.validator.format("Please enter between {0} and {1} words."))}(),a.validator.addMethod("accept",function(b,c,d){var e,f,g="string"==typeof d?d.replace(/\s/g,"").replace(/,/g,"|"):"image/*",h=this.optional(c);if(h)return h;if("file"===a(c).attr("type")&&(g=g.replace(/\*/g,".*"),c.files&&c.files.length))for(e=0;ec;c++)d=h-c,e=f.substring(c,c+1),g+=d*e;return g%11===0},"Please specify a valid bank account number"),a.validator.addMethod("bankorgiroaccountNL",function(b,c){return this.optional(c)||a.validator.methods.bankaccountNL.call(this,b,c)||a.validator.methods.giroaccountNL.call(this,b,c)},"Please specify a valid bank or giro account number"),a.validator.addMethod("bic",function(a,b){return this.optional(b)||/^([A-Z]{6}[A-Z2-9][A-NP-Z1-2])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test(a)},"Please specify a valid BIC code"),a.validator.addMethod("cifES",function(a){"use strict";var b,c,d,e,f,g,h=[];if(a=a.toUpperCase(),!a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)"))return!1;for(d=0;9>d;d++)h[d]=parseInt(a.charAt(d),10);for(c=h[2]+h[4]+h[6],e=1;8>e;e+=2)f=(2*h[e]).toString(),g=f.charAt(1),c+=parseInt(f.charAt(0),10)+(""===g?0:parseInt(g,10));return/^[ABCDEFGHJNPQRSUVW]{1}/.test(a)?(c+="",b=10-parseInt(c.charAt(c.length-1),10),a+=b,h[8].toString()===String.fromCharCode(64+b)||h[8].toString()===a.charAt(a.length-1)):!1},"Please specify a valid CIF number."),a.validator.addMethod("cpfBR",function(a){if(a=a.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,""),11!==a.length)return!1;var b,c,d,e,f=0;if(b=parseInt(a.substring(9,10),10),c=parseInt(a.substring(10,11),10),d=function(a,b){var c=10*a%11;return(10===c||11===c)&&(c=0),c===b},""===a||"00000000000"===a||"11111111111"===a||"22222222222"===a||"33333333333"===a||"44444444444"===a||"55555555555"===a||"66666666666"===a||"77777777777"===a||"88888888888"===a||"99999999999"===a)return!1;for(e=1;9>=e;e++)f+=parseInt(a.substring(e-1,e),10)*(11-e);if(d(f,b)){for(f=0,e=1;10>=e;e++)f+=parseInt(a.substring(e-1,e),10)*(12-e);return d(f,c)}return!1},"Please specify a valid CPF number"),a.validator.addMethod("creditcardtypes",function(a,b,c){if(/[^0-9\-]+/.test(a))return!1;a=a.replace(/\D/g,"");var d=0;return c.mastercard&&(d|=1),c.visa&&(d|=2),c.amex&&(d|=4),c.dinersclub&&(d|=8),c.enroute&&(d|=16),c.discover&&(d|=32),c.jcb&&(d|=64),c.unknown&&(d|=128),c.all&&(d=255),1&d&&/^(5[12345])/.test(a)?16===a.length:2&d&&/^(4)/.test(a)?16===a.length:4&d&&/^(3[47])/.test(a)?15===a.length:8&d&&/^(3(0[012345]|[68]))/.test(a)?14===a.length:16&d&&/^(2(014|149))/.test(a)?15===a.length:32&d&&/^(6011)/.test(a)?16===a.length:64&d&&/^(3)/.test(a)?16===a.length:64&d&&/^(2131|1800)/.test(a)?15===a.length:128&d?!0:!1},"Please enter a valid credit card number."),a.validator.addMethod("currency",function(a,b,c){var d,e="string"==typeof c,f=e?c:c[0],g=e?!0:c[1];return f=f.replace(/,/g,""),f=g?f+"]":f+"]?",d="^["+f+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",d=new RegExp(d),this.optional(b)||d.test(a)},"Please specify a valid currency"),a.validator.addMethod("dateFA",function(a,b){return this.optional(b)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(a)},a.validator.messages.date),a.validator.addMethod("dateITA",function(a,b){var c,d,e,f,g,h=!1,i=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return i.test(a)?(c=a.split("/"),d=parseInt(c[0],10),e=parseInt(c[1],10),f=parseInt(c[2],10),g=new Date(Date.UTC(f,e-1,d,12,0,0,0)),h=g.getUTCFullYear()===f&&g.getUTCMonth()===e-1&&g.getUTCDate()===d?!0:!1):h=!1,this.optional(b)||h},a.validator.messages.date),a.validator.addMethod("dateNL",function(a,b){return this.optional(b)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(a)},a.validator.messages.date),a.validator.addMethod("extension",function(a,b,c){return c="string"==typeof c?c.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(b)||a.match(new RegExp("\\.("+c+")$","i"))},a.validator.format("Please enter a value with a valid extension.")),a.validator.addMethod("giroaccountNL",function(a,b){return this.optional(b)||/^[0-9]{1,7}$/.test(a)},"Please specify a valid giro account number"),a.validator.addMethod("iban",function(a,b){if(this.optional(b))return!0;var c,d,e,f,g,h,i,j,k,l=a.replace(/ /g,"").toUpperCase(),m="",n=!0,o="",p="";if(c=l.substring(0,2),h={AL:"\\d{8}[\\dA-Z]{16}",AD:"\\d{8}[\\dA-Z]{12}",AT:"\\d{16}",AZ:"[\\dA-Z]{4}\\d{20}",BE:"\\d{12}",BH:"[A-Z]{4}[\\dA-Z]{14}",BA:"\\d{16}",BR:"\\d{23}[A-Z][\\dA-Z]",BG:"[A-Z]{4}\\d{6}[\\dA-Z]{8}",CR:"\\d{17}",HR:"\\d{17}",CY:"\\d{8}[\\dA-Z]{16}",CZ:"\\d{20}",DK:"\\d{14}",DO:"[A-Z]{4}\\d{20}",EE:"\\d{16}",FO:"\\d{14}",FI:"\\d{14}",FR:"\\d{10}[\\dA-Z]{11}\\d{2}",GE:"[\\dA-Z]{2}\\d{16}",DE:"\\d{18}",GI:"[A-Z]{4}[\\dA-Z]{15}",GR:"\\d{7}[\\dA-Z]{16}",GL:"\\d{14}",GT:"[\\dA-Z]{4}[\\dA-Z]{20}",HU:"\\d{24}",IS:"\\d{22}",IE:"[\\dA-Z]{4}\\d{14}",IL:"\\d{19}",IT:"[A-Z]\\d{10}[\\dA-Z]{12}",KZ:"\\d{3}[\\dA-Z]{13}",KW:"[A-Z]{4}[\\dA-Z]{22}",LV:"[A-Z]{4}[\\dA-Z]{13}",LB:"\\d{4}[\\dA-Z]{20}",LI:"\\d{5}[\\dA-Z]{12}",LT:"\\d{16}",LU:"\\d{3}[\\dA-Z]{13}",MK:"\\d{3}[\\dA-Z]{10}\\d{2}",MT:"[A-Z]{4}\\d{5}[\\dA-Z]{18}",MR:"\\d{23}",MU:"[A-Z]{4}\\d{19}[A-Z]{3}",MC:"\\d{10}[\\dA-Z]{11}\\d{2}",MD:"[\\dA-Z]{2}\\d{18}",ME:"\\d{18}",NL:"[A-Z]{4}\\d{10}",NO:"\\d{11}",PK:"[\\dA-Z]{4}\\d{16}",PS:"[\\dA-Z]{4}\\d{21}",PL:"\\d{24}",PT:"\\d{21}",RO:"[A-Z]{4}[\\dA-Z]{16}",SM:"[A-Z]\\d{10}[\\dA-Z]{12}",SA:"\\d{2}[\\dA-Z]{18}",RS:"\\d{18}",SK:"\\d{20}",SI:"\\d{15}",ES:"\\d{20}",SE:"\\d{20}",CH:"\\d{5}[\\dA-Z]{12}",TN:"\\d{20}",TR:"\\d{5}[\\dA-Z]{17}",AE:"\\d{3}\\d{16}",GB:"[A-Z]{4}\\d{14}",VG:"[\\dA-Z]{4}\\d{16}"},g=h[c],"undefined"!=typeof g&&(i=new RegExp("^[A-Z]{2}\\d{2}"+g+"$",""),!i.test(l)))return!1;for(d=l.substring(4,l.length)+l.substring(0,4),j=0;j9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number"),a.validator.addMethod("nieES",function(a){"use strict";return a=a.toUpperCase(),a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")?/^[T]{1}/.test(a)?a[8]===/^[T]{1}[A-Z0-9]{8}$/.test(a):/^[XYZ]{1}/.test(a)?a[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.replace("X","0").replace("Y","1").replace("Z","2").substring(0,8)%23):!1:!1},"Please specify a valid NIE number."),a.validator.addMethod("nifES",function(a){"use strict";return a=a.toUpperCase(),a.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")?/^[0-9]{8}[A-Z]{1}$/.test(a)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(a.substring(8,0)%23)===a.charAt(8):/^[KLM]{1}/.test(a)?a[8]===String.fromCharCode(64):!1:!1},"Please specify a valid NIF number."),jQuery.validator.addMethod("notEqualTo",function(b,c,d){return this.optional(c)||!a.validator.methods.equalTo.call(this,b,c,d)},"Please enter a different value, values must not be the same."),a.validator.addMethod("nowhitespace",function(a,b){return this.optional(b)||/^\S+$/i.test(a)},"No white space please"),a.validator.addMethod("pattern",function(a,b,c){return this.optional(b)?!0:("string"==typeof c&&(c=new RegExp("^(?:"+c+")$")),c.test(a))},"Invalid format."),a.validator.addMethod("phoneNL",function(a,b){return this.optional(b)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(a)},"Please specify a valid phone number."),a.validator.addMethod("phoneUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number"),a.validator.addMethod("phoneUS",function(a,b){return a=a.replace(/\s+/g,""),this.optional(b)||a.length>9&&a.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/)},"Please specify a valid phone number"),a.validator.addMethod("phonesUK",function(a,b){return a=a.replace(/\(|\)|\s+|-/g,""),this.optional(b)||a.length>9&&a.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number"),a.validator.addMethod("postalCodeCA",function(a,b){return this.optional(b)||/^[ABCEGHJKLMNPRSTVXY]\d[A-Z] \d[A-Z]\d$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeBR",function(a,b){return this.optional(b)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(a)},"Informe um CEP válido."),a.validator.addMethod("postalcodeIT",function(a,b){return this.optional(b)||/^\d{5}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postalcodeNL",function(a,b){return this.optional(b)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(a)},"Please specify a valid postal code"),a.validator.addMethod("postcodeUK",function(a,b){return this.optional(b)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(a)},"Please specify a valid UK postcode"),a.validator.addMethod("require_from_group",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_req_grp")?f.data("valid_req_grp"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length>=d[0];return f.data("valid_req_grp",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),h},a.validator.format("Please fill at least {0} of these fields.")),a.validator.addMethod("skip_or_fill_minimum",function(b,c,d){var e=a(d[1],c.form),f=e.eq(0),g=f.data("valid_skip")?f.data("valid_skip"):a.extend({},this),h=e.filter(function(){return g.elementValue(this)}).length,i=0===h||h>=d[0];return f.data("valid_skip",g),a(c).data("being_validated")||(e.data("being_validated",!0),e.each(function(){g.element(this)}),e.data("being_validated",!1)),i},a.validator.format("Please either skip these fields or fill at least {0} of them.")),a.validator.addMethod("stateUS",function(a,b,c){var d,e="undefined"==typeof c,f=e||"undefined"==typeof c.caseSensitive?!1:c.caseSensitive,g=e||"undefined"==typeof c.includeTerritories?!1:c.includeTerritories,h=e||"undefined"==typeof c.includeMilitary?!1:c.includeMilitary;return d=g||h?g&&h?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":g?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",d=f?new RegExp(d):new RegExp(d,"i"),this.optional(b)||d.test(a)},"Please specify a valid state"),a.validator.addMethod("strippedminlength",function(b,c,d){return a(b).text().length>=d},a.validator.format("Please enter at least {0} characters")),a.validator.addMethod("time",function(a,b){return this.optional(b)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(a)},"Please enter a valid time, between 00:00 and 23:59"),a.validator.addMethod("time12h",function(a,b){return this.optional(b)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(a)},"Please enter a valid time in 12-hour am/pm format"),a.validator.addMethod("url2",function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},a.validator.messages.url),a.validator.addMethod("vinUS",function(a){if(17!==a.length)return!1;var b,c,d,e,f,g,h=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],i=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],j=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],k=0;for(b=0;17>b;b++){if(e=j[b],d=a.slice(b,b+1),8===b&&(g=d),isNaN(d)){for(c=0;c