├── PackagesManagement ├── Views │ ├── _ViewStart.cshtml │ ├── _ViewImports.cshtml │ ├── Home │ │ ├── Privacy.cshtml │ │ └── Index.cshtml │ ├── Shared │ │ ├── Error.cshtml │ │ ├── _CookieConsentPartial.cshtml │ │ ├── _ValidationScriptsPartial.cshtml │ │ └── _Layout.cshtml │ ├── Account │ │ └── Login.cshtml │ └── ManagePackages │ │ ├── Index.cshtml │ │ └── Edit.cshtml ├── Tools │ ├── ICommand.cs │ ├── IQuery.cs │ ├── ICommandHandler.cs │ ├── IEventHandler.cs │ ├── EventTrigger.cs │ ├── EventMediator.cs │ └── EventDIExtensions.cs ├── wwwroot │ ├── favicon.ico │ ├── js │ │ └── site.js │ ├── lib │ │ ├── jquery-validation-unobtrusive │ │ │ ├── LICENSE.txt │ │ │ └── jquery.validate.unobtrusive.min.js │ │ ├── jquery-validation │ │ │ └── LICENSE.md │ │ ├── bootstrap │ │ │ ├── LICENSE │ │ │ └── dist │ │ │ │ └── css │ │ │ │ ├── bootstrap-reboot.min.css │ │ │ │ └── bootstrap-reboot.css │ │ └── jquery │ │ │ └── LICENSE.txt │ └── css │ │ └── site.css ├── appsettings.Development.json ├── Models │ ├── ErrorViewModel.cs │ └── Account │ │ └── LoginViewModel.cs ├── Queries │ ├── IDestinationListQuery.cs │ ├── IPackagesListQuery.cs │ ├── DestinationListQuery.cs │ └── PackagesListQuery.cs ├── Commands │ ├── DeletePackageCommand.cs │ ├── CreatePackageCommand.cs │ └── UpdatePackageCommand.cs ├── appsettings.json ├── PackagesManagement.csproj ├── Properties │ └── launchSettings.json ├── Program.cs ├── Handlers │ ├── PackageDeleteEventHandler.cs │ ├── CreatePackageCommandHandler.cs │ ├── PackagePriceChangedEventHandler.cs │ ├── DeletePackageCommandHandler.cs │ └── UpdatePackageCommandHandler.cs ├── Controllers │ ├── HomeController.cs │ ├── ManagePackagesController.cs │ └── AccountController.cs └── Startup.cs ├── PackagesManagementBlazor ├── Client │ ├── wwwroot │ │ ├── favicon.ico │ │ ├── css │ │ │ ├── open-iconic │ │ │ │ ├── font │ │ │ │ │ ├── fonts │ │ │ │ │ │ ├── open-iconic.eot │ │ │ │ │ │ ├── open-iconic.otf │ │ │ │ │ │ ├── open-iconic.ttf │ │ │ │ │ │ └── open-iconic.woff │ │ │ │ │ └── css │ │ │ │ │ │ └── open-iconic-bootstrap.min.css │ │ │ │ ├── ICON-LICENSE │ │ │ │ ├── README.md │ │ │ │ └── FONT-LICENSE │ │ │ └── app.css │ │ └── index.html │ ├── ViewModels │ │ └── SearchViewModel.cs │ ├── App.razor │ ├── Shared │ │ ├── MainLayout.razor │ │ ├── NavMenu.razor │ │ ├── NavMenu.razor.css │ │ └── MainLayout.razor.css │ ├── _Imports.razor │ ├── PackagesManagementBlazor.Client.csproj │ ├── Services │ │ └── PackagesClient.cs │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ └── Pages │ │ └── Index.razor ├── Server │ ├── appsettings.Development.json │ ├── Tools │ │ ├── IQuery.cs │ │ └── EventDIExtensions.cs │ ├── Queries │ │ ├── IPackagesListByLocationQuery.cs │ │ └── PackagesListByLocationQuery.cs │ ├── appsettings.json │ ├── Pages │ │ ├── Shared │ │ │ └── _Layout.cshtml │ │ ├── Error.cshtml.cs │ │ └── Error.cshtml │ ├── PackagesManagementBlazor.Server.csproj │ ├── Controllers │ │ └── PackagesController.cs │ ├── Properties │ │ └── launchSettings.json │ ├── Program.cs │ └── Startup.cs └── Shared │ ├── PackagesListViewModel.cs │ ├── PackagesManagementBlazor.Shared.csproj │ └── PackageInfosViewModel.cs ├── PackagesManagementDomain ├── Tools │ ├── IEventNotification.cs │ ├── IRepository.cs │ ├── IUnitOfWork.cs │ ├── IEventMediator.cs │ ├── IEntity.cs │ ├── RepositoryExtensions.cs │ └── Entity.cs ├── Aggregates │ ├── IDestination.cs │ ├── IPackageEvent.cs │ └── IPackage.cs ├── PackagesManagementDomain.csproj ├── IRepositories │ ├── IDestinationRepository.cs │ ├── IPackageRepository.cs │ └── IPackageEventRepository.cs ├── DTOs │ └── IPackageFullEditDTO.cs └── Events │ ├── PackageDeleteEvent.cs │ └── PackagePriceChangedEvent.cs ├── PackagesManagementDB ├── Models │ ├── PackageEvent.cs │ ├── Destination.cs │ └── Package.cs ├── Properties │ └── launchSettings.json ├── Repositories │ ├── DestinationRepository.cs │ ├── PackageEventRepository.cs │ └── PackageRepository.cs ├── PackagesManagementDB.csproj ├── MainDBContext.cs ├── Extensions │ └── DBExtensions.cs └── Migrations │ ├── MainDBContextModelSnapshot.cs │ ├── 20190803103812_Initial.Designer.cs │ └── 20190803103812_Initial.cs ├── .gitattributes ├── PackagesManagement.sln └── .gitignore /PackagesManagement/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /PackagesManagement/Tools/ICommand.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace DDD.ApplicationLayer 3 | { 4 | public interface ICommand 5 | { 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /PackagesManagement/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirzaf/PackagesManagementBlazor/HEAD/PackagesManagement/wwwroot/favicon.ico -------------------------------------------------------------------------------- /PackagesManagement/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using PackagesManagement 2 | @using PackagesManagement.Models 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /PackagesManagementBlazor/Client/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirzaf/PackagesManagementBlazor/HEAD/PackagesManagementBlazor/Client/wwwroot/favicon.ico -------------------------------------------------------------------------------- /PackagesManagement/Views/Home/Privacy.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Privacy Policy"; 3 | } 4 |
Use this page to detail your site's privacy policy.
7 | -------------------------------------------------------------------------------- /PackagesManagement/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /PackagesManagementBlazor/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirzaf/PackagesManagementBlazor/HEAD/PackagesManagementBlazor/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /PackagesManagementBlazor/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirzaf/PackagesManagementBlazor/HEAD/PackagesManagementBlazor/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /PackagesManagementBlazor/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirzaf/PackagesManagementBlazor/HEAD/PackagesManagementBlazor/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /PackagesManagementBlazor/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nirzaf/PackagesManagementBlazor/HEAD/PackagesManagementBlazor/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /PackagesManagementDomain/Tools/IEventNotification.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace DDD.DomainLayer 6 | { 7 | public interface IEventNotification 8 | { 9 | } 10 | } -------------------------------------------------------------------------------- /PackagesManagementBlazor/Server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /PackagesManagement/Tools/IQuery.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace DDD.ApplicationLayer 7 | { 8 | public interface IQuery 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /PackagesManagementBlazor/Server/Tools/IQuery.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace DDD.ApplicationLayer 7 | { 8 | public interface IQuery 9 | { 10 | } 11 | } -------------------------------------------------------------------------------- /PackagesManagementDomain/Tools/IRepository.cs: -------------------------------------------------------------------------------- 1 | namespace DDD.DomainLayer 2 | { 3 | public interface IRepository 4 | { 5 | } 6 | 7 | public interface IRepositoryLearn about building Web apps with ASP.NET Core.
8 |Sorry, there's nothing at this address.
8 |
12 | Request ID: @Model.RequestId
13 |
18 | Swapping to Development environment will display more detailed information about the error that occurred. 19 |
20 |21 | The Development environment shouldn't be enabled for deployed applications. 22 | It can result in displaying sensitive information from exceptions to end users. 23 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 24 | and restarting the app. 25 |
26 | -------------------------------------------------------------------------------- /PackagesManagementBlazor/Client/wwwroot/css/app.css: -------------------------------------------------------------------------------- 1 | @import url('open-iconic/font/css/open-iconic-bootstrap.min.css'); 2 | 3 | html, body { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; } 4 | 5 | a, .btn-link { color: #0366d6; } 6 | 7 | .btn-primary { 8 | color: #fff; 9 | background-color: #1b6ec2; 10 | border-color: #1861ac; 11 | } 12 | 13 | .content { padding-top: 1.1rem; } 14 | 15 | .valid.modified:not([type=checkbox]) { outline: 1px solid #26b050; } 16 | 17 | .invalid { outline: 1px solid red; } 18 | 19 | .validation-message { color: red; } 20 | 21 | #blazor-error-ui { 22 | background: lightyellow; 23 | bottom: 0; 24 | box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); 25 | display: none; 26 | left: 0; 27 | padding: 0.6rem 1.25rem 0.7rem 1.25rem; 28 | position: fixed; 29 | width: 100%; 30 | z-index: 1000; 31 | } 32 | 33 | #blazor-error-ui .dismiss { 34 | cursor: pointer; 35 | position: absolute; 36 | right: 0.75rem; 37 | top: 0.5rem; 38 | } -------------------------------------------------------------------------------- /PackagesManagementBlazor/Client/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Components.WebAssembly.Hosting; 2 | using Microsoft.Extensions.Configuration; 3 | using Microsoft.Extensions.DependencyInjection; 4 | using Microsoft.Extensions.Logging; 5 | using PackagesManagementBlazor.Client.Services; 6 | using System; 7 | using System.Collections.Generic; 8 | using System.Net.Http; 9 | using System.Text; 10 | using System.Threading.Tasks; 11 | 12 | namespace PackagesManagementBlazor.Client 13 | { 14 | public class Program 15 | { 16 | public static async Task Main(string[] args) 17 | { 18 | var builder = WebAssemblyHostBuilder.CreateDefault(args); 19 | builder.RootComponents.Add
14 | Request ID: @Model.RequestId
15 |
20 | Swapping to the Development environment displays detailed information about the error that occurred. 21 |
22 |23 | The Development environment shouldn't be enabled for deployed applications. 24 | It can result in displaying sensitive information from exceptions to end users. 25 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 26 | and restarting the app. 27 |
-------------------------------------------------------------------------------- /PackagesManagementBlazor/Client/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:51830", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 15 | "environmentVariables": { 16 | "ASPNETCORE_ENVIRONMENT": "Development" 17 | } 18 | }, 19 | "PackagesManagementBlazor": { 20 | "commandName": "Project", 21 | "dotnetRunMessages": "true", 22 | "launchBrowser": true, 23 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 24 | "applicationUrl": "http://localhost:5000", 25 | "environmentVariables": { 26 | "ASPNETCORE_ENVIRONMENT": "Development" 27 | } 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /PackagesManagementBlazor/Server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:51830", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 15 | "environmentVariables": { 16 | "ASPNETCORE_ENVIRONMENT": "Development" 17 | } 18 | }, 19 | "PackagesManagementBlazor.Server": { 20 | "commandName": "Project", 21 | "dotnetRunMessages": "true", 22 | "launchBrowser": true, 23 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 24 | "applicationUrl": "http://localhost:5000", 25 | "environmentVariables": { 26 | "ASPNETCORE_ENVIRONMENT": "Development" 27 | } 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /PackagesManagement/Handlers/DeletePackageCommandHandler.cs: -------------------------------------------------------------------------------- 1 | using DDD.ApplicationLayer; 2 | using DDD.DomainLayer; 3 | using PackagesManagement.Commands; 4 | using PackagesManagementDomain.IRepositories; 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Linq; 8 | using System.Threading.Tasks; 9 | 10 | namespace PackagesManagement.Handlers 11 | { 12 | public class DeletePackageCommandHandler : ICommandHandler| Destination | 28 |Name | 29 |Duration/days | 30 |Price | 31 |Available from | 32 |Available to | 33 | 34 |
|---|---|---|---|---|---|
| 41 | @package.DestinationName 42 | | 43 |44 | @package.Name 45 | | 46 |47 | @package.DurationInDays 48 | | 49 |50 | @package.Price 51 | | 52 |53 | @(package.StartValidityDate.HasValue ? 54 | package.StartValidityDate.Value.ToString("d") 55 | : string.Empty) 56 | | 57 |58 | @(package.EndValidityDate.HasValue ? 59 | package.EndValidityDate.Value.ToString("d") 60 | : string.Empty) 61 | | 62 | 63 |
72 | Loading... 73 |
74 | } 75 | 76 | @code{ 77 | SearchViewModel search { get; set; } = new(); 78 | private IEnumerable| Delete | 14 |Edit | 15 |Destination | 16 |Name | 17 |Duration/days | 18 |Price | 19 |Availble from | 20 |Availble to | 21 | 22 |
|---|---|---|---|---|---|---|---|
| 29 | 32 | delete 33 | 34 | | 35 |36 | 39 | edit 40 | 41 | | 42 |43 | @package.DestinationName 44 | | 45 |46 | @package.Name 47 | | 48 |49 | @package.DurationInDays 50 | | 51 |52 | @package.Price 53 | | 54 |55 | @(package.StartValidityDate.HasValue ? 56 | package.StartValidityDate.Value.ToString("d") 57 | : 58 | String.Empty) 59 | | 60 |61 | @(package.EndValidityDate.HasValue ? 62 | package.EndValidityDate.Value.ToString("d") 63 | : 64 | String.Empty) 65 | | 66 | 67 |