TODO:
- For conversion to .net6: Only program.cs remove startup. Change to file scope namespaces, check again for dependencies
----
- For app: - front dizajn
- fajlovi da se uploaduju
- job za fajlove
master
| @@ -5,4 +5,5 @@ SecureSharing.Data/bin | |||
| SecureSharing.Business/obj | |||
| SecureSharing.Business/bin | |||
| SecureSharing/obj | |||
| SecureSharing/bin | |||
| SecureSharing/bin | |||
| SecureSharing/AppData | |||
| @@ -1,13 +0,0 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| namespace MVCTemplate.Business.Dtos | |||
| { | |||
| public class BaseDto | |||
| { | |||
| public int Id { get; set; } | |||
| } | |||
| } | |||
| @@ -1,17 +0,0 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| namespace MVCTemplate.Business.Dtos | |||
| { | |||
| public class MessageDto:BaseDto | |||
| { | |||
| public string Text { get; set; } | |||
| public bool IsValid { get; set; } = true; | |||
| public DateTime? ExpiryDate { get; set; } | |||
| } | |||
| } | |||
| @@ -1,33 +0,0 @@ | |||
| using AutoMapper; | |||
| using Microsoft.Extensions.DependencyInjection; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| namespace MVCTemplate.Business.Infrastructure.Extensions | |||
| { | |||
| public class StartupExtensions | |||
| { | |||
| public static void ConfigureServices(IServiceCollection services) | |||
| { | |||
| Data.Extensions.StartupExtensions.ConfigureServices(services); | |||
| // TODO: add all missing services | |||
| var mapperConfiguration = new MapperConfiguration(mc => | |||
| { | |||
| mc.AddProfile(new MapperProfile()); | |||
| }); | |||
| IMapper mapper = mapperConfiguration.CreateMapper(); | |||
| services.AddSingleton(mapper); | |||
| //services.AddLocalization(options => options.ResourcesPath = "Infrastructure/Resources"); | |||
| } | |||
| } | |||
| } | |||
| @@ -1,19 +0,0 @@ | |||
| using AutoMapper; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| using MVCTemplate.Data.Data; | |||
| using MVCTemplate.Business.Dtos; | |||
| namespace MVCTemplate.Business.Infrastructure | |||
| { | |||
| public class MapperProfile : Profile | |||
| { | |||
| public MapperProfile() | |||
| { | |||
| CreateMap<Message, MessageDto>().ReverseMap(); | |||
| } | |||
| } | |||
| } | |||
| @@ -1,11 +0,0 @@ | |||
| | |||
| namespace MVCTemplate.Business.Infrastructure | |||
| { | |||
| public enum PeriodOfValidity | |||
| { | |||
| ONE_TIME, | |||
| ONE_HOUR, | |||
| ONE_DAY, | |||
| ONE_WEEK | |||
| } | |||
| } | |||
| @@ -1,13 +0,0 @@ | |||
| namespace MVCTemplate.Business.Infrastructure.Settings | |||
| { | |||
| public class EmailSettings | |||
| { | |||
| public string SmtpServer { get; set; } | |||
| public int SmtpPort { get; set; } | |||
| public bool SmtpUseSSL { get; set; } | |||
| public string SmtpUsername { get; set; } | |||
| public string SmtpPassword { get; set; } | |||
| public string SmtpFrom { get; set; } | |||
| public string SmtpFromName { get; set; } | |||
| } | |||
| } | |||
| @@ -1,29 +0,0 @@ | |||
| using Microsoft.Extensions.Configuration; | |||
| using Microsoft.Extensions.DependencyInjection; | |||
| using System; | |||
| namespace MVCTemplate.Business.Infrastructure | |||
| { | |||
| public class StartupConfiguration | |||
| { | |||
| public static TConfig ConfigureStartupConfig<TConfig>(IServiceCollection services, IConfiguration configuration) where TConfig : class, new() | |||
| { | |||
| if (services == null) | |||
| throw new ArgumentNullException(nameof(services)); | |||
| if (configuration == null) | |||
| throw new ArgumentNullException(nameof(configuration)); | |||
| //create instance of config | |||
| var config = new TConfig(); | |||
| var classType = typeof(TConfig); | |||
| //bind it to the appropriate section of configuration | |||
| configuration.Bind(classType.Name, config); | |||
| //and register it as a service | |||
| services.AddSingleton(config); | |||
| return config; | |||
| } | |||
| } | |||
| } | |||
| @@ -1,23 +0,0 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| using MVCTemplate.Business.Dtos; | |||
| using MVCTemplate.Business.Infrastructure; | |||
| namespace MVCTemplate.Business.Interfaces | |||
| { | |||
| public interface IMessageService | |||
| { | |||
| public Task<IEnumerable<MessageDto>> GetAll(); | |||
| public Task<int> Create(MessageDto messageDto, PeriodOfValidity chosenPeriod); | |||
| public Task DeleteExpiredMessages(); | |||
| public Task InvalidateMessage(int id); | |||
| public Task Update(MessageDto messageDto); | |||
| public Task<MessageDto> GetById(int messageDto); | |||
| public Task<bool> Delete(int messageDto); | |||
| } | |||
| } | |||
| @@ -1,20 +0,0 @@ | |||
| <Project Sdk="Microsoft.NET.Sdk"> | |||
| <PropertyGroup> | |||
| <TargetFramework>net5.0</TargetFramework> | |||
| </PropertyGroup> | |||
| <ItemGroup> | |||
| <PackageReference Include="AutoMapper" Version="11.0.1" /> | |||
| <PackageReference Include="MailKit" Version="2.13.0" /> | |||
| <PackageReference Include="Microsoft.AspNetCore.Authentication.Google" Version="5.0.7" /> | |||
| <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.7" /> | |||
| <PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="5.0.0" /> | |||
| <PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.0" /> | |||
| </ItemGroup> | |||
| <ItemGroup> | |||
| <ProjectReference Include="..\MVCTemplate.Data\MVCTemplate.Data.csproj" /> | |||
| </ItemGroup> | |||
| </Project> | |||
| @@ -1,106 +0,0 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| using AutoMapper; | |||
| using MVCTemplate.Business.Dtos; | |||
| using MVCTemplate.Business.Interfaces; | |||
| using MVCTemplate.Data.Data; | |||
| using MVCTemplate.Data.DbContexts; | |||
| using Microsoft.EntityFrameworkCore; | |||
| using MVCTemplate.Business.Infrastructure; | |||
| namespace MVCTemplate.Business.Services | |||
| { | |||
| public class MessageService:IMessageService | |||
| { | |||
| private readonly AppDbContext _dbContext; | |||
| private readonly IMapper _mapper; | |||
| public MessageService(AppDbContext dbContext, IMapper mapper) | |||
| { | |||
| _dbContext = dbContext; | |||
| _mapper = mapper; | |||
| } | |||
| public async Task<int> Create(MessageDto messageDto, PeriodOfValidity chosenPeriod) | |||
| { | |||
| Message message = _mapper.Map<Message>(messageDto); | |||
| switch (chosenPeriod) | |||
| { | |||
| case (PeriodOfValidity.ONE_TIME): | |||
| message.ExpiryDate = null; | |||
| break; | |||
| case PeriodOfValidity.ONE_DAY: | |||
| message.ExpiryDate = DateTime.UtcNow.AddMinutes(1); | |||
| break; | |||
| case PeriodOfValidity.ONE_HOUR: | |||
| message.ExpiryDate = DateTime.UtcNow.AddHours(1); | |||
| break; | |||
| case PeriodOfValidity.ONE_WEEK: | |||
| message.ExpiryDate = DateTime.UtcNow.AddDays(7); | |||
| break; | |||
| default: | |||
| message.ExpiryDate = null; | |||
| break; | |||
| } | |||
| await _dbContext.Messages.AddAsync(message); | |||
| await _dbContext.SaveChangesAsync(); | |||
| return message.Id; | |||
| } | |||
| public async Task DeleteExpiredMessages() | |||
| { | |||
| var result = await _dbContext.Messages.Where(m =>(m.ExpiryDate != null && m.ExpiryDate <= DateTime.UtcNow)||(!m.IsValid) ).ToListAsync(); | |||
| _dbContext.RemoveRange(result); | |||
| await _dbContext.SaveChangesAsync(); | |||
| } | |||
| public async Task InvalidateMessage(int id) | |||
| { | |||
| var message = await _dbContext.Messages.Where(m => m.Id == id).FirstOrDefaultAsync(); | |||
| message.IsValid = false; | |||
| await _dbContext.SaveChangesAsync(); | |||
| } | |||
| public async Task<bool> Delete(int messageId) | |||
| { | |||
| MessageDto messageDto = await GetById(messageId); | |||
| if (messageDto == null) return false; | |||
| _dbContext.Set<Message>().Remove(_mapper.Map<Message>(messageDto)); | |||
| try | |||
| { | |||
| await _dbContext.SaveChangesAsync(); | |||
| } | |||
| catch (Microsoft.EntityFrameworkCore.DbUpdateException) | |||
| { | |||
| return false; | |||
| } | |||
| return true; | |||
| } | |||
| public async Task<IEnumerable<MessageDto>> GetAll() | |||
| { | |||
| var result = await _dbContext.Messages.AsNoTracking().ToListAsync(); | |||
| var mappedResult = _mapper.Map<IEnumerable<MessageDto>>(result); | |||
| return mappedResult; | |||
| } | |||
| public async Task<MessageDto> GetById(int messageId) | |||
| { | |||
| var result = await _dbContext.Messages.AsNoTracking().FirstOrDefaultAsync(x => x.Id == messageId); | |||
| var mappedResult = _mapper.Map<MessageDto>(result); | |||
| return mappedResult; | |||
| } | |||
| public async Task Update(MessageDto messageDto) | |||
| { | |||
| var a = _dbContext.Messages.Update(_mapper.Map<Message>(messageDto)); | |||
| await _dbContext.SaveChangesAsync(); | |||
| } | |||
| } | |||
| } | |||
| @@ -1,10 +0,0 @@ | |||
| is_global = true | |||
| build_property.TargetFramework = net5.0 | |||
| build_property.TargetPlatformMinVersion = | |||
| build_property.UsingMicrosoftNETSdkWeb = | |||
| build_property.ProjectTypeGuids = | |||
| build_property.PublishSingleFile = | |||
| build_property.IncludeAllContentForSelfExtract = | |||
| build_property._SupportedPlatformList = Android,iOS,Linux,macOS,Windows | |||
| build_property.RootNamespace = MVCTemplate.Business | |||
| build_property.ProjectDir = C:\Users\julija.stojkovic\source\repos\secure-sharing\MVCTemplate.Business\ | |||
| @@ -1,182 +0,0 @@ | |||
| { | |||
| "format": 1, | |||
| "restore": { | |||
| "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate.Business\\MVCTemplate.Business.csproj": {} | |||
| }, | |||
| "projects": { | |||
| "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate.Business\\MVCTemplate.Business.csproj": { | |||
| "version": "1.0.0", | |||
| "restore": { | |||
| "projectUniqueName": "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate.Business\\MVCTemplate.Business.csproj", | |||
| "projectName": "MVCTemplate.Business", | |||
| "projectPath": "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate.Business\\MVCTemplate.Business.csproj", | |||
| "packagesPath": "C:\\Users\\julija.stojkovic\\.nuget\\packages\\", | |||
| "outputPath": "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate.Business\\obj\\", | |||
| "projectStyle": "PackageReference", | |||
| "configFilePaths": [ | |||
| "C:\\Users\\julija.stojkovic\\AppData\\Roaming\\NuGet\\NuGet.Config", | |||
| "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" | |||
| ], | |||
| "originalTargetFrameworks": [ | |||
| "net5.0" | |||
| ], | |||
| "sources": { | |||
| "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, | |||
| "https://api.nuget.org/v3/index.json": {} | |||
| }, | |||
| "frameworks": { | |||
| "net5.0": { | |||
| "targetAlias": "net5.0", | |||
| "projectReferences": { | |||
| "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate.Data\\MVCTemplate.Data.csproj": { | |||
| "projectPath": "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate.Data\\MVCTemplate.Data.csproj" | |||
| } | |||
| } | |||
| } | |||
| }, | |||
| "warningProperties": { | |||
| "warnAsError": [ | |||
| "NU1605" | |||
| ] | |||
| } | |||
| }, | |||
| "frameworks": { | |||
| "net5.0": { | |||
| "targetAlias": "net5.0", | |||
| "dependencies": { | |||
| "AutoMapper": { | |||
| "target": "Package", | |||
| "version": "[11.0.1, )" | |||
| }, | |||
| "MailKit": { | |||
| "target": "Package", | |||
| "version": "[2.13.0, )" | |||
| }, | |||
| "Microsoft.AspNetCore.Authentication.Google": { | |||
| "target": "Package", | |||
| "version": "[5.0.7, )" | |||
| }, | |||
| "Microsoft.EntityFrameworkCore.SqlServer": { | |||
| "target": "Package", | |||
| "version": "[5.0.7, )" | |||
| }, | |||
| "Microsoft.Extensions.Configuration.Binder": { | |||
| "target": "Package", | |||
| "version": "[5.0.0, )" | |||
| }, | |||
| "Microsoft.Extensions.DependencyInjection.Abstractions": { | |||
| "target": "Package", | |||
| "version": "[5.0.0, )" | |||
| } | |||
| }, | |||
| "imports": [ | |||
| "net461", | |||
| "net462", | |||
| "net47", | |||
| "net471", | |||
| "net472", | |||
| "net48" | |||
| ], | |||
| "assetTargetFallback": true, | |||
| "warn": true, | |||
| "frameworkReferences": { | |||
| "Microsoft.NETCore.App": { | |||
| "privateAssets": "all" | |||
| } | |||
| }, | |||
| "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.400\\RuntimeIdentifierGraph.json" | |||
| } | |||
| } | |||
| }, | |||
| "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate.Data\\MVCTemplate.Data.csproj": { | |||
| "version": "1.0.0", | |||
| "restore": { | |||
| "projectUniqueName": "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate.Data\\MVCTemplate.Data.csproj", | |||
| "projectName": "MVCTemplate.Data", | |||
| "projectPath": "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate.Data\\MVCTemplate.Data.csproj", | |||
| "packagesPath": "C:\\Users\\julija.stojkovic\\.nuget\\packages\\", | |||
| "outputPath": "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate.Data\\obj\\", | |||
| "projectStyle": "PackageReference", | |||
| "configFilePaths": [ | |||
| "C:\\Users\\julija.stojkovic\\AppData\\Roaming\\NuGet\\NuGet.Config", | |||
| "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" | |||
| ], | |||
| "originalTargetFrameworks": [ | |||
| "net5.0" | |||
| ], | |||
| "sources": { | |||
| "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, | |||
| "https://api.nuget.org/v3/index.json": {} | |||
| }, | |||
| "frameworks": { | |||
| "net5.0": { | |||
| "targetAlias": "net5.0", | |||
| "projectReferences": {} | |||
| } | |||
| }, | |||
| "warningProperties": { | |||
| "warnAsError": [ | |||
| "NU1605" | |||
| ] | |||
| } | |||
| }, | |||
| "frameworks": { | |||
| "net5.0": { | |||
| "targetAlias": "net5.0", | |||
| "dependencies": { | |||
| "AutoMapper": { | |||
| "target": "Package", | |||
| "version": "[11.0.1, )" | |||
| }, | |||
| "Microsoft.AspNetCore.Authentication.Google": { | |||
| "target": "Package", | |||
| "version": "[5.0.7, )" | |||
| }, | |||
| "Microsoft.AspNetCore.Identity.EntityFrameworkCore": { | |||
| "target": "Package", | |||
| "version": "[5.0.4, )" | |||
| }, | |||
| "Microsoft.EntityFrameworkCore": { | |||
| "target": "Package", | |||
| "version": "[5.0.7, )" | |||
| }, | |||
| "Microsoft.EntityFrameworkCore.SqlServer": { | |||
| "target": "Package", | |||
| "version": "[5.0.7, )" | |||
| }, | |||
| "Microsoft.EntityFrameworkCore.Tools": { | |||
| "include": "Runtime, Build, Native, ContentFiles, Analyzers, BuildTransitive", | |||
| "suppressParent": "All", | |||
| "target": "Package", | |||
| "version": "[5.0.4, )" | |||
| }, | |||
| "Microsoft.Extensions.Configuration": { | |||
| "target": "Package", | |||
| "version": "[5.0.0, )" | |||
| }, | |||
| "Microsoft.Extensions.Configuration.Json": { | |||
| "target": "Package", | |||
| "version": "[5.0.0, )" | |||
| } | |||
| }, | |||
| "imports": [ | |||
| "net461", | |||
| "net462", | |||
| "net47", | |||
| "net471", | |||
| "net472", | |||
| "net48" | |||
| ], | |||
| "assetTargetFallback": true, | |||
| "warn": true, | |||
| "frameworkReferences": { | |||
| "Microsoft.NETCore.App": { | |||
| "privateAssets": "all" | |||
| } | |||
| }, | |||
| "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.400\\RuntimeIdentifierGraph.json" | |||
| } | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @@ -1,21 +0,0 @@ | |||
| <?xml version="1.0" encoding="utf-8" standalone="no"?> | |||
| <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
| <PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' "> | |||
| <RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess> | |||
| <RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool> | |||
| <ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile> | |||
| <NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot> | |||
| <NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\julija.stojkovic\.nuget\packages\</NuGetPackageFolders> | |||
| <NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle> | |||
| <NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.11.0</NuGetToolVersion> | |||
| </PropertyGroup> | |||
| <ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' "> | |||
| <SourceRoot Include="C:\Users\julija.stojkovic\.nuget\packages\" /> | |||
| </ItemGroup> | |||
| <PropertyGroup> | |||
| <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects> | |||
| </PropertyGroup> | |||
| <PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' "> | |||
| <PkgNewtonsoft_Json Condition=" '$(PkgNewtonsoft_Json)' == '' ">C:\Users\julija.stojkovic\.nuget\packages\newtonsoft.json\10.0.1</PkgNewtonsoft_Json> | |||
| </PropertyGroup> | |||
| </Project> | |||
| @@ -1,6 +0,0 @@ | |||
| <?xml version="1.0" encoding="utf-8" standalone="no"?> | |||
| <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
| <PropertyGroup> | |||
| <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects> | |||
| </PropertyGroup> | |||
| </Project> | |||
| @@ -1,122 +0,0 @@ | |||
| { | |||
| "version": 2, | |||
| "dgSpecHash": "rzyMAE0y0bO++0S9vu4eE05TI4t4QyxwYjndAaROA9nQF1pRgH0GHfECFev9EANemwidXH6tak9vWt6P3lBjKA==", | |||
| "success": true, | |||
| "projectFilePath": "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate.Business\\MVCTemplate.Business.csproj", | |||
| "expectedPackageFiles": [ | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\automapper\\11.0.1\\automapper.11.0.1.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\mailkit\\2.13.0\\mailkit.2.13.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.aspnetcore.authentication.google\\5.0.7\\microsoft.aspnetcore.authentication.google.5.0.7.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.aspnetcore.cryptography.internal\\5.0.4\\microsoft.aspnetcore.cryptography.internal.5.0.4.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.aspnetcore.cryptography.keyderivation\\5.0.4\\microsoft.aspnetcore.cryptography.keyderivation.5.0.4.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.aspnetcore.identity.entityframeworkcore\\5.0.4\\microsoft.aspnetcore.identity.entityframeworkcore.5.0.4.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.csharp\\4.7.0\\microsoft.csharp.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.data.sqlclient\\2.0.1\\microsoft.data.sqlclient.2.0.1.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.data.sqlclient.sni.runtime\\2.0.1\\microsoft.data.sqlclient.sni.runtime.2.0.1.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.entityframeworkcore\\5.0.7\\microsoft.entityframeworkcore.5.0.7.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.entityframeworkcore.abstractions\\5.0.7\\microsoft.entityframeworkcore.abstractions.5.0.7.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.entityframeworkcore.analyzers\\5.0.7\\microsoft.entityframeworkcore.analyzers.5.0.7.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.entityframeworkcore.relational\\5.0.7\\microsoft.entityframeworkcore.relational.5.0.7.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.entityframeworkcore.sqlserver\\5.0.7\\microsoft.entityframeworkcore.sqlserver.5.0.7.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.caching.abstractions\\5.0.0\\microsoft.extensions.caching.abstractions.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.caching.memory\\5.0.0\\microsoft.extensions.caching.memory.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.configuration\\5.0.0\\microsoft.extensions.configuration.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.configuration.abstractions\\5.0.0\\microsoft.extensions.configuration.abstractions.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.configuration.binder\\5.0.0\\microsoft.extensions.configuration.binder.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.configuration.fileextensions\\5.0.0\\microsoft.extensions.configuration.fileextensions.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.configuration.json\\5.0.0\\microsoft.extensions.configuration.json.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.dependencyinjection\\5.0.1\\microsoft.extensions.dependencyinjection.5.0.1.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.dependencyinjection.abstractions\\5.0.0\\microsoft.extensions.dependencyinjection.abstractions.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.fileproviders.abstractions\\5.0.0\\microsoft.extensions.fileproviders.abstractions.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.fileproviders.physical\\5.0.0\\microsoft.extensions.fileproviders.physical.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.filesystemglobbing\\5.0.0\\microsoft.extensions.filesystemglobbing.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.identity.core\\5.0.4\\microsoft.extensions.identity.core.5.0.4.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.identity.stores\\5.0.4\\microsoft.extensions.identity.stores.5.0.4.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.logging\\5.0.0\\microsoft.extensions.logging.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.logging.abstractions\\5.0.0\\microsoft.extensions.logging.abstractions.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.options\\5.0.0\\microsoft.extensions.options.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.primitives\\5.0.0\\microsoft.extensions.primitives.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.identity.client\\4.14.0\\microsoft.identity.client.4.14.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.identitymodel.jsonwebtokens\\5.6.0\\microsoft.identitymodel.jsonwebtokens.5.6.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.identitymodel.logging\\5.6.0\\microsoft.identitymodel.logging.5.6.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.identitymodel.protocols\\5.6.0\\microsoft.identitymodel.protocols.5.6.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.identitymodel.protocols.openidconnect\\5.6.0\\microsoft.identitymodel.protocols.openidconnect.5.6.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.identitymodel.tokens\\5.6.0\\microsoft.identitymodel.tokens.5.6.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.netcore.platforms\\3.1.0\\microsoft.netcore.platforms.3.1.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.netcore.targets\\1.1.3\\microsoft.netcore.targets.1.1.3.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.win32.registry\\4.7.0\\microsoft.win32.registry.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.win32.systemevents\\4.7.0\\microsoft.win32.systemevents.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\mimekit\\2.13.0\\mimekit.2.13.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\newtonsoft.json\\10.0.1\\newtonsoft.json.10.0.1.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\portable.bouncycastle\\1.8.10\\portable.bouncycastle.1.8.10.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\runtime.native.system\\4.3.0\\runtime.native.system.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.buffers\\4.5.1\\system.buffers.4.5.1.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.collections\\4.3.0\\system.collections.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.collections.concurrent\\4.3.0\\system.collections.concurrent.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.collections.immutable\\5.0.0\\system.collections.immutable.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.collections.nongeneric\\4.3.0\\system.collections.nongeneric.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.collections.specialized\\4.3.0\\system.collections.specialized.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.componentmodel\\4.3.0\\system.componentmodel.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.componentmodel.annotations\\5.0.0\\system.componentmodel.annotations.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.componentmodel.primitives\\4.3.0\\system.componentmodel.primitives.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.componentmodel.typeconverter\\4.3.0\\system.componentmodel.typeconverter.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.configuration.configurationmanager\\4.7.0\\system.configuration.configurationmanager.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.diagnostics.debug\\4.3.0\\system.diagnostics.debug.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.diagnostics.diagnosticsource\\5.0.1\\system.diagnostics.diagnosticsource.5.0.1.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.diagnostics.tools\\4.3.0\\system.diagnostics.tools.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.diagnostics.tracing\\4.3.0\\system.diagnostics.tracing.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.drawing.common\\4.7.0\\system.drawing.common.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.dynamic.runtime\\4.3.0\\system.dynamic.runtime.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.globalization\\4.3.0\\system.globalization.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.globalization.extensions\\4.3.0\\system.globalization.extensions.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.identitymodel.tokens.jwt\\5.6.0\\system.identitymodel.tokens.jwt.5.6.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.io\\4.3.0\\system.io.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.io.filesystem\\4.3.0\\system.io.filesystem.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.io.filesystem.primitives\\4.3.0\\system.io.filesystem.primitives.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.linq\\4.3.0\\system.linq.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.linq.expressions\\4.3.0\\system.linq.expressions.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.net.nameresolution\\4.3.0\\system.net.nameresolution.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.net.primitives\\4.3.0\\system.net.primitives.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.objectmodel\\4.3.0\\system.objectmodel.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.private.datacontractserialization\\4.3.0\\system.private.datacontractserialization.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.private.uri\\4.3.2\\system.private.uri.4.3.2.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.reflection\\4.3.0\\system.reflection.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.reflection.emit\\4.3.0\\system.reflection.emit.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.reflection.emit.ilgeneration\\4.3.0\\system.reflection.emit.ilgeneration.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.reflection.emit.lightweight\\4.3.0\\system.reflection.emit.lightweight.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.reflection.extensions\\4.3.0\\system.reflection.extensions.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.reflection.primitives\\4.3.0\\system.reflection.primitives.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.reflection.typeextensions\\4.4.0\\system.reflection.typeextensions.4.4.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.resources.resourcemanager\\4.3.0\\system.resources.resourcemanager.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.runtime\\4.3.0\\system.runtime.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.runtime.caching\\4.7.0\\system.runtime.caching.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.runtime.extensions\\4.3.0\\system.runtime.extensions.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.runtime.handles\\4.3.0\\system.runtime.handles.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.runtime.interopservices\\4.3.0\\system.runtime.interopservices.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.runtime.numerics\\4.3.0\\system.runtime.numerics.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.runtime.serialization.formatters\\4.3.0\\system.runtime.serialization.formatters.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.runtime.serialization.json\\4.3.0\\system.runtime.serialization.json.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.runtime.serialization.primitives\\4.3.0\\system.runtime.serialization.primitives.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.security.accesscontrol\\4.7.0\\system.security.accesscontrol.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.security.cryptography.cng\\4.7.0\\system.security.cryptography.cng.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.security.cryptography.pkcs\\4.7.0\\system.security.cryptography.pkcs.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.security.cryptography.primitives\\4.3.0\\system.security.cryptography.primitives.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.security.cryptography.protecteddata\\4.7.0\\system.security.cryptography.protecteddata.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.security.permissions\\4.7.0\\system.security.permissions.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.security.principal.windows\\4.7.0\\system.security.principal.windows.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.security.securestring\\4.3.0\\system.security.securestring.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.text.encoding\\4.3.0\\system.text.encoding.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.text.encoding.codepages\\4.7.0\\system.text.encoding.codepages.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.text.encoding.extensions\\4.3.0\\system.text.encoding.extensions.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.text.regularexpressions\\4.3.0\\system.text.regularexpressions.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.threading\\4.3.0\\system.threading.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.threading.tasks\\4.3.0\\system.threading.tasks.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.threading.tasks.extensions\\4.3.0\\system.threading.tasks.extensions.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.windows.extensions\\4.7.0\\system.windows.extensions.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.xml.readerwriter\\4.3.0\\system.xml.readerwriter.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.xml.xdocument\\4.3.0\\system.xml.xdocument.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.xml.xmldocument\\4.3.0\\system.xml.xmldocument.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.xml.xmlserializer\\4.3.0\\system.xml.xmlserializer.4.3.0.nupkg.sha512" | |||
| ], | |||
| "logs": [] | |||
| } | |||
| @@ -1,13 +0,0 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| namespace MVCTemplate.Data.Data | |||
| { | |||
| public class BaseEntity | |||
| { | |||
| public int Id { get; set; } | |||
| } | |||
| } | |||
| @@ -1,15 +0,0 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| namespace MVCTemplate.Data.Data | |||
| { | |||
| public class Message:BaseEntity | |||
| { | |||
| public string Text { get; set; } | |||
| public bool IsValid { get; set; } | |||
| public DateTime? ExpiryDate { get; set; } | |||
| } | |||
| } | |||
| @@ -1,21 +0,0 @@ | |||
| using Microsoft.AspNetCore.Identity.EntityFrameworkCore; | |||
| using Microsoft.EntityFrameworkCore; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using MVCTemplate.Data.Data; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| namespace MVCTemplate.Data.DbContexts | |||
| { | |||
| public class AppDbContext : IdentityDbContext | |||
| { | |||
| public AppDbContext(DbContextOptions<AppDbContext> options) : base(options) { } | |||
| public DbSet<Message> Messages { get; set; } | |||
| } | |||
| } | |||
| @@ -1,26 +0,0 @@ | |||
| using Microsoft.Extensions.DependencyInjection; | |||
| using Microsoft.EntityFrameworkCore; | |||
| using Microsoft.Extensions.Configuration; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| using MVCTemplate.Data.DbContexts; | |||
| using Microsoft.AspNetCore.Identity; | |||
| namespace MVCTemplate.Data.Extensions | |||
| { | |||
| public class StartupExtensions | |||
| { | |||
| public static void ConfigureServices(IServiceCollection services) | |||
| { | |||
| var configuration = new ConfigurationBuilder() | |||
| .AddJsonFile(path: "appsettings.json") | |||
| .Build(); | |||
| services.AddDbContext<AppDbContext>(options => | |||
| options.UseSqlServer( | |||
| configuration.GetConnectionString("DefaultConnection"))); | |||
| } | |||
| } | |||
| } | |||
| @@ -1,21 +0,0 @@ | |||
| <Project Sdk="Microsoft.NET.Sdk"> | |||
| <PropertyGroup> | |||
| <TargetFramework>net5.0</TargetFramework> | |||
| </PropertyGroup> | |||
| <ItemGroup> | |||
| <PackageReference Include="AutoMapper" Version="11.0.1" /> | |||
| <PackageReference Include="Microsoft.AspNetCore.Authentication.Google" Version="5.0.7" /> | |||
| <PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.4" /> | |||
| <PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.7" /> | |||
| <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.7" /> | |||
| <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.4"> | |||
| <PrivateAssets>all</PrivateAssets> | |||
| <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | |||
| </PackageReference> | |||
| <PackageReference Include="Microsoft.Extensions.Configuration" Version="5.0.0" /> | |||
| <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="5.0.0" /> | |||
| </ItemGroup> | |||
| </Project> | |||
| @@ -1,277 +0,0 @@ | |||
| // <auto-generated /> | |||
| using System; | |||
| using Microsoft.EntityFrameworkCore; | |||
| using Microsoft.EntityFrameworkCore.Infrastructure; | |||
| using Microsoft.EntityFrameworkCore.Metadata; | |||
| using Microsoft.EntityFrameworkCore.Migrations; | |||
| using Microsoft.EntityFrameworkCore.Storage.ValueConversion; | |||
| using MVCTemplate.Data.DbContexts; | |||
| namespace MVCTemplate.Data.Migrations | |||
| { | |||
| [DbContext(typeof(AppDbContext))] | |||
| [Migration("20220906133332_init")] | |||
| partial class init | |||
| { | |||
| protected override void BuildTargetModel(ModelBuilder modelBuilder) | |||
| { | |||
| #pragma warning disable 612, 618 | |||
| modelBuilder | |||
| .HasAnnotation("Relational:MaxIdentifierLength", 128) | |||
| .HasAnnotation("ProductVersion", "5.0.7") | |||
| .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => | |||
| { | |||
| b.Property<string>("Id") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.Property<string>("ConcurrencyStamp") | |||
| .IsConcurrencyToken() | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("Name") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.Property<string>("NormalizedName") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.HasKey("Id"); | |||
| b.HasIndex("NormalizedName") | |||
| .IsUnique() | |||
| .HasDatabaseName("RoleNameIndex") | |||
| .HasFilter("[NormalizedName] IS NOT NULL"); | |||
| b.ToTable("AspNetRoles"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => | |||
| { | |||
| b.Property<int>("Id") | |||
| .ValueGeneratedOnAdd() | |||
| .HasColumnType("int") | |||
| .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | |||
| b.Property<string>("ClaimType") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("ClaimValue") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("RoleId") | |||
| .IsRequired() | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.HasKey("Id"); | |||
| b.HasIndex("RoleId"); | |||
| b.ToTable("AspNetRoleClaims"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b => | |||
| { | |||
| b.Property<string>("Id") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.Property<int>("AccessFailedCount") | |||
| .HasColumnType("int"); | |||
| b.Property<string>("ConcurrencyStamp") | |||
| .IsConcurrencyToken() | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("Email") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.Property<bool>("EmailConfirmed") | |||
| .HasColumnType("bit"); | |||
| b.Property<bool>("LockoutEnabled") | |||
| .HasColumnType("bit"); | |||
| b.Property<DateTimeOffset?>("LockoutEnd") | |||
| .HasColumnType("datetimeoffset"); | |||
| b.Property<string>("NormalizedEmail") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.Property<string>("NormalizedUserName") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.Property<string>("PasswordHash") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("PhoneNumber") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<bool>("PhoneNumberConfirmed") | |||
| .HasColumnType("bit"); | |||
| b.Property<string>("SecurityStamp") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<bool>("TwoFactorEnabled") | |||
| .HasColumnType("bit"); | |||
| b.Property<string>("UserName") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.HasKey("Id"); | |||
| b.HasIndex("NormalizedEmail") | |||
| .HasDatabaseName("EmailIndex"); | |||
| b.HasIndex("NormalizedUserName") | |||
| .IsUnique() | |||
| .HasDatabaseName("UserNameIndex") | |||
| .HasFilter("[NormalizedUserName] IS NOT NULL"); | |||
| b.ToTable("AspNetUsers"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b => | |||
| { | |||
| b.Property<int>("Id") | |||
| .ValueGeneratedOnAdd() | |||
| .HasColumnType("int") | |||
| .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | |||
| b.Property<string>("ClaimType") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("ClaimValue") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("UserId") | |||
| .IsRequired() | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.HasKey("Id"); | |||
| b.HasIndex("UserId"); | |||
| b.ToTable("AspNetUserClaims"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => | |||
| { | |||
| b.Property<string>("LoginProvider") | |||
| .HasMaxLength(128) | |||
| .HasColumnType("nvarchar(128)"); | |||
| b.Property<string>("ProviderKey") | |||
| .HasMaxLength(128) | |||
| .HasColumnType("nvarchar(128)"); | |||
| b.Property<string>("ProviderDisplayName") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("UserId") | |||
| .IsRequired() | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.HasKey("LoginProvider", "ProviderKey"); | |||
| b.HasIndex("UserId"); | |||
| b.ToTable("AspNetUserLogins"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b => | |||
| { | |||
| b.Property<string>("UserId") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.Property<string>("RoleId") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.HasKey("UserId", "RoleId"); | |||
| b.HasIndex("RoleId"); | |||
| b.ToTable("AspNetUserRoles"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b => | |||
| { | |||
| b.Property<string>("UserId") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.Property<string>("LoginProvider") | |||
| .HasMaxLength(128) | |||
| .HasColumnType("nvarchar(128)"); | |||
| b.Property<string>("Name") | |||
| .HasMaxLength(128) | |||
| .HasColumnType("nvarchar(128)"); | |||
| b.Property<string>("Value") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.HasKey("UserId", "LoginProvider", "Name"); | |||
| b.ToTable("AspNetUserTokens"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) | |||
| .WithMany() | |||
| .HasForeignKey("RoleId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) | |||
| .WithMany() | |||
| .HasForeignKey("UserId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) | |||
| .WithMany() | |||
| .HasForeignKey("UserId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) | |||
| .WithMany() | |||
| .HasForeignKey("RoleId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) | |||
| .WithMany() | |||
| .HasForeignKey("UserId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) | |||
| .WithMany() | |||
| .HasForeignKey("UserId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| #pragma warning restore 612, 618 | |||
| } | |||
| } | |||
| } | |||
| @@ -1,219 +0,0 @@ | |||
| using System; | |||
| using Microsoft.EntityFrameworkCore.Migrations; | |||
| namespace MVCTemplate.Data.Migrations | |||
| { | |||
| public partial class init : Migration | |||
| { | |||
| protected override void Up(MigrationBuilder migrationBuilder) | |||
| { | |||
| migrationBuilder.CreateTable( | |||
| name: "AspNetRoles", | |||
| columns: table => new | |||
| { | |||
| Id = table.Column<string>(type: "nvarchar(450)", nullable: false), | |||
| Name = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true), | |||
| NormalizedName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true), | |||
| ConcurrencyStamp = table.Column<string>(type: "nvarchar(max)", nullable: true) | |||
| }, | |||
| constraints: table => | |||
| { | |||
| table.PrimaryKey("PK_AspNetRoles", x => x.Id); | |||
| }); | |||
| migrationBuilder.CreateTable( | |||
| name: "AspNetUsers", | |||
| columns: table => new | |||
| { | |||
| Id = table.Column<string>(type: "nvarchar(450)", nullable: false), | |||
| UserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true), | |||
| NormalizedUserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true), | |||
| Email = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true), | |||
| NormalizedEmail = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true), | |||
| EmailConfirmed = table.Column<bool>(type: "bit", nullable: false), | |||
| PasswordHash = table.Column<string>(type: "nvarchar(max)", nullable: true), | |||
| SecurityStamp = table.Column<string>(type: "nvarchar(max)", nullable: true), | |||
| ConcurrencyStamp = table.Column<string>(type: "nvarchar(max)", nullable: true), | |||
| PhoneNumber = table.Column<string>(type: "nvarchar(max)", nullable: true), | |||
| PhoneNumberConfirmed = table.Column<bool>(type: "bit", nullable: false), | |||
| TwoFactorEnabled = table.Column<bool>(type: "bit", nullable: false), | |||
| LockoutEnd = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true), | |||
| LockoutEnabled = table.Column<bool>(type: "bit", nullable: false), | |||
| AccessFailedCount = table.Column<int>(type: "int", nullable: false) | |||
| }, | |||
| constraints: table => | |||
| { | |||
| table.PrimaryKey("PK_AspNetUsers", x => x.Id); | |||
| }); | |||
| migrationBuilder.CreateTable( | |||
| name: "AspNetRoleClaims", | |||
| columns: table => new | |||
| { | |||
| Id = table.Column<int>(type: "int", nullable: false) | |||
| .Annotation("SqlServer:Identity", "1, 1"), | |||
| RoleId = table.Column<string>(type: "nvarchar(450)", nullable: false), | |||
| ClaimType = table.Column<string>(type: "nvarchar(max)", nullable: true), | |||
| ClaimValue = table.Column<string>(type: "nvarchar(max)", nullable: true) | |||
| }, | |||
| constraints: table => | |||
| { | |||
| table.PrimaryKey("PK_AspNetRoleClaims", x => x.Id); | |||
| table.ForeignKey( | |||
| name: "FK_AspNetRoleClaims_AspNetRoles_RoleId", | |||
| column: x => x.RoleId, | |||
| principalTable: "AspNetRoles", | |||
| principalColumn: "Id", | |||
| onDelete: ReferentialAction.Cascade); | |||
| }); | |||
| migrationBuilder.CreateTable( | |||
| name: "AspNetUserClaims", | |||
| columns: table => new | |||
| { | |||
| Id = table.Column<int>(type: "int", nullable: false) | |||
| .Annotation("SqlServer:Identity", "1, 1"), | |||
| UserId = table.Column<string>(type: "nvarchar(450)", nullable: false), | |||
| ClaimType = table.Column<string>(type: "nvarchar(max)", nullable: true), | |||
| ClaimValue = table.Column<string>(type: "nvarchar(max)", nullable: true) | |||
| }, | |||
| constraints: table => | |||
| { | |||
| table.PrimaryKey("PK_AspNetUserClaims", x => x.Id); | |||
| table.ForeignKey( | |||
| name: "FK_AspNetUserClaims_AspNetUsers_UserId", | |||
| column: x => x.UserId, | |||
| principalTable: "AspNetUsers", | |||
| principalColumn: "Id", | |||
| onDelete: ReferentialAction.Cascade); | |||
| }); | |||
| migrationBuilder.CreateTable( | |||
| name: "AspNetUserLogins", | |||
| columns: table => new | |||
| { | |||
| LoginProvider = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), | |||
| ProviderKey = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), | |||
| ProviderDisplayName = table.Column<string>(type: "nvarchar(max)", nullable: true), | |||
| UserId = table.Column<string>(type: "nvarchar(450)", nullable: false) | |||
| }, | |||
| constraints: table => | |||
| { | |||
| table.PrimaryKey("PK_AspNetUserLogins", x => new { x.LoginProvider, x.ProviderKey }); | |||
| table.ForeignKey( | |||
| name: "FK_AspNetUserLogins_AspNetUsers_UserId", | |||
| column: x => x.UserId, | |||
| principalTable: "AspNetUsers", | |||
| principalColumn: "Id", | |||
| onDelete: ReferentialAction.Cascade); | |||
| }); | |||
| migrationBuilder.CreateTable( | |||
| name: "AspNetUserRoles", | |||
| columns: table => new | |||
| { | |||
| UserId = table.Column<string>(type: "nvarchar(450)", nullable: false), | |||
| RoleId = table.Column<string>(type: "nvarchar(450)", nullable: false) | |||
| }, | |||
| constraints: table => | |||
| { | |||
| table.PrimaryKey("PK_AspNetUserRoles", x => new { x.UserId, x.RoleId }); | |||
| table.ForeignKey( | |||
| name: "FK_AspNetUserRoles_AspNetRoles_RoleId", | |||
| column: x => x.RoleId, | |||
| principalTable: "AspNetRoles", | |||
| principalColumn: "Id", | |||
| onDelete: ReferentialAction.Cascade); | |||
| table.ForeignKey( | |||
| name: "FK_AspNetUserRoles_AspNetUsers_UserId", | |||
| column: x => x.UserId, | |||
| principalTable: "AspNetUsers", | |||
| principalColumn: "Id", | |||
| onDelete: ReferentialAction.Cascade); | |||
| }); | |||
| migrationBuilder.CreateTable( | |||
| name: "AspNetUserTokens", | |||
| columns: table => new | |||
| { | |||
| UserId = table.Column<string>(type: "nvarchar(450)", nullable: false), | |||
| LoginProvider = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), | |||
| Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), | |||
| Value = table.Column<string>(type: "nvarchar(max)", nullable: true) | |||
| }, | |||
| constraints: table => | |||
| { | |||
| table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); | |||
| table.ForeignKey( | |||
| name: "FK_AspNetUserTokens_AspNetUsers_UserId", | |||
| column: x => x.UserId, | |||
| principalTable: "AspNetUsers", | |||
| principalColumn: "Id", | |||
| onDelete: ReferentialAction.Cascade); | |||
| }); | |||
| migrationBuilder.CreateIndex( | |||
| name: "IX_AspNetRoleClaims_RoleId", | |||
| table: "AspNetRoleClaims", | |||
| column: "RoleId"); | |||
| migrationBuilder.CreateIndex( | |||
| name: "RoleNameIndex", | |||
| table: "AspNetRoles", | |||
| column: "NormalizedName", | |||
| unique: true, | |||
| filter: "[NormalizedName] IS NOT NULL"); | |||
| migrationBuilder.CreateIndex( | |||
| name: "IX_AspNetUserClaims_UserId", | |||
| table: "AspNetUserClaims", | |||
| column: "UserId"); | |||
| migrationBuilder.CreateIndex( | |||
| name: "IX_AspNetUserLogins_UserId", | |||
| table: "AspNetUserLogins", | |||
| column: "UserId"); | |||
| migrationBuilder.CreateIndex( | |||
| name: "IX_AspNetUserRoles_RoleId", | |||
| table: "AspNetUserRoles", | |||
| column: "RoleId"); | |||
| migrationBuilder.CreateIndex( | |||
| name: "EmailIndex", | |||
| table: "AspNetUsers", | |||
| column: "NormalizedEmail"); | |||
| migrationBuilder.CreateIndex( | |||
| name: "UserNameIndex", | |||
| table: "AspNetUsers", | |||
| column: "NormalizedUserName", | |||
| unique: true, | |||
| filter: "[NormalizedUserName] IS NOT NULL"); | |||
| } | |||
| protected override void Down(MigrationBuilder migrationBuilder) | |||
| { | |||
| migrationBuilder.DropTable( | |||
| name: "AspNetRoleClaims"); | |||
| migrationBuilder.DropTable( | |||
| name: "AspNetUserClaims"); | |||
| migrationBuilder.DropTable( | |||
| name: "AspNetUserLogins"); | |||
| migrationBuilder.DropTable( | |||
| name: "AspNetUserRoles"); | |||
| migrationBuilder.DropTable( | |||
| name: "AspNetUserTokens"); | |||
| migrationBuilder.DropTable( | |||
| name: "AspNetRoles"); | |||
| migrationBuilder.DropTable( | |||
| name: "AspNetUsers"); | |||
| } | |||
| } | |||
| } | |||
| @@ -1,292 +0,0 @@ | |||
| // <auto-generated /> | |||
| using System; | |||
| using MVCTemplate.Data.DbContexts; | |||
| using Microsoft.EntityFrameworkCore; | |||
| using Microsoft.EntityFrameworkCore.Infrastructure; | |||
| using Microsoft.EntityFrameworkCore.Metadata; | |||
| using Microsoft.EntityFrameworkCore.Migrations; | |||
| using Microsoft.EntityFrameworkCore.Storage.ValueConversion; | |||
| namespace MVCTemplate.Data.Migrations | |||
| { | |||
| [DbContext(typeof(AppDbContext))] | |||
| [Migration("20220908115806_AddMessagesTable")] | |||
| partial class AddMessagesTable | |||
| { | |||
| protected override void BuildTargetModel(ModelBuilder modelBuilder) | |||
| { | |||
| #pragma warning disable 612, 618 | |||
| modelBuilder | |||
| .HasAnnotation("Relational:MaxIdentifierLength", 128) | |||
| .HasAnnotation("ProductVersion", "5.0.7") | |||
| .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | |||
| modelBuilder.Entity("MVCTemplate.Data.Data.Message", b => | |||
| { | |||
| b.Property<int>("Id") | |||
| .ValueGeneratedOnAdd() | |||
| .HasColumnType("int") | |||
| .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | |||
| b.Property<string>("Text") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.HasKey("Id"); | |||
| b.ToTable("Messages"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => | |||
| { | |||
| b.Property<string>("Id") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.Property<string>("ConcurrencyStamp") | |||
| .IsConcurrencyToken() | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("Name") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.Property<string>("NormalizedName") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.HasKey("Id"); | |||
| b.HasIndex("NormalizedName") | |||
| .IsUnique() | |||
| .HasDatabaseName("RoleNameIndex") | |||
| .HasFilter("[NormalizedName] IS NOT NULL"); | |||
| b.ToTable("AspNetRoles"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => | |||
| { | |||
| b.Property<int>("Id") | |||
| .ValueGeneratedOnAdd() | |||
| .HasColumnType("int") | |||
| .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | |||
| b.Property<string>("ClaimType") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("ClaimValue") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("RoleId") | |||
| .IsRequired() | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.HasKey("Id"); | |||
| b.HasIndex("RoleId"); | |||
| b.ToTable("AspNetRoleClaims"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b => | |||
| { | |||
| b.Property<string>("Id") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.Property<int>("AccessFailedCount") | |||
| .HasColumnType("int"); | |||
| b.Property<string>("ConcurrencyStamp") | |||
| .IsConcurrencyToken() | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("Email") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.Property<bool>("EmailConfirmed") | |||
| .HasColumnType("bit"); | |||
| b.Property<bool>("LockoutEnabled") | |||
| .HasColumnType("bit"); | |||
| b.Property<DateTimeOffset?>("LockoutEnd") | |||
| .HasColumnType("datetimeoffset"); | |||
| b.Property<string>("NormalizedEmail") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.Property<string>("NormalizedUserName") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.Property<string>("PasswordHash") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("PhoneNumber") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<bool>("PhoneNumberConfirmed") | |||
| .HasColumnType("bit"); | |||
| b.Property<string>("SecurityStamp") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<bool>("TwoFactorEnabled") | |||
| .HasColumnType("bit"); | |||
| b.Property<string>("UserName") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.HasKey("Id"); | |||
| b.HasIndex("NormalizedEmail") | |||
| .HasDatabaseName("EmailIndex"); | |||
| b.HasIndex("NormalizedUserName") | |||
| .IsUnique() | |||
| .HasDatabaseName("UserNameIndex") | |||
| .HasFilter("[NormalizedUserName] IS NOT NULL"); | |||
| b.ToTable("AspNetUsers"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b => | |||
| { | |||
| b.Property<int>("Id") | |||
| .ValueGeneratedOnAdd() | |||
| .HasColumnType("int") | |||
| .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | |||
| b.Property<string>("ClaimType") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("ClaimValue") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("UserId") | |||
| .IsRequired() | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.HasKey("Id"); | |||
| b.HasIndex("UserId"); | |||
| b.ToTable("AspNetUserClaims"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => | |||
| { | |||
| b.Property<string>("LoginProvider") | |||
| .HasMaxLength(128) | |||
| .HasColumnType("nvarchar(128)"); | |||
| b.Property<string>("ProviderKey") | |||
| .HasMaxLength(128) | |||
| .HasColumnType("nvarchar(128)"); | |||
| b.Property<string>("ProviderDisplayName") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("UserId") | |||
| .IsRequired() | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.HasKey("LoginProvider", "ProviderKey"); | |||
| b.HasIndex("UserId"); | |||
| b.ToTable("AspNetUserLogins"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b => | |||
| { | |||
| b.Property<string>("UserId") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.Property<string>("RoleId") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.HasKey("UserId", "RoleId"); | |||
| b.HasIndex("RoleId"); | |||
| b.ToTable("AspNetUserRoles"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b => | |||
| { | |||
| b.Property<string>("UserId") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.Property<string>("LoginProvider") | |||
| .HasMaxLength(128) | |||
| .HasColumnType("nvarchar(128)"); | |||
| b.Property<string>("Name") | |||
| .HasMaxLength(128) | |||
| .HasColumnType("nvarchar(128)"); | |||
| b.Property<string>("Value") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.HasKey("UserId", "LoginProvider", "Name"); | |||
| b.ToTable("AspNetUserTokens"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) | |||
| .WithMany() | |||
| .HasForeignKey("RoleId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) | |||
| .WithMany() | |||
| .HasForeignKey("UserId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) | |||
| .WithMany() | |||
| .HasForeignKey("UserId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) | |||
| .WithMany() | |||
| .HasForeignKey("RoleId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) | |||
| .WithMany() | |||
| .HasForeignKey("UserId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) | |||
| .WithMany() | |||
| .HasForeignKey("UserId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| #pragma warning restore 612, 618 | |||
| } | |||
| } | |||
| } | |||
| @@ -1,29 +0,0 @@ | |||
| using Microsoft.EntityFrameworkCore.Migrations; | |||
| namespace MVCTemplate.Data.Migrations | |||
| { | |||
| public partial class AddMessagesTable : Migration | |||
| { | |||
| protected override void Up(MigrationBuilder migrationBuilder) | |||
| { | |||
| migrationBuilder.CreateTable( | |||
| name: "Messages", | |||
| columns: table => new | |||
| { | |||
| Id = table.Column<int>(type: "int", nullable: false) | |||
| .Annotation("SqlServer:Identity", "1, 1"), | |||
| Text = table.Column<string>(type: "nvarchar(max)", nullable: true) | |||
| }, | |||
| constraints: table => | |||
| { | |||
| table.PrimaryKey("PK_Messages", x => x.Id); | |||
| }); | |||
| } | |||
| protected override void Down(MigrationBuilder migrationBuilder) | |||
| { | |||
| migrationBuilder.DropTable( | |||
| name: "Messages"); | |||
| } | |||
| } | |||
| } | |||
| @@ -1,298 +0,0 @@ | |||
| // <auto-generated /> | |||
| using System; | |||
| using MVCTemplate.Data.DbContexts; | |||
| using Microsoft.EntityFrameworkCore; | |||
| using Microsoft.EntityFrameworkCore.Infrastructure; | |||
| using Microsoft.EntityFrameworkCore.Metadata; | |||
| using Microsoft.EntityFrameworkCore.Migrations; | |||
| using Microsoft.EntityFrameworkCore.Storage.ValueConversion; | |||
| namespace MVCTemplate.Data.Migrations | |||
| { | |||
| [DbContext(typeof(AppDbContext))] | |||
| [Migration("20220909105407_MessageExpiryDate")] | |||
| partial class MessageExpiryDate | |||
| { | |||
| protected override void BuildTargetModel(ModelBuilder modelBuilder) | |||
| { | |||
| #pragma warning disable 612, 618 | |||
| modelBuilder | |||
| .HasAnnotation("Relational:MaxIdentifierLength", 128) | |||
| .HasAnnotation("ProductVersion", "5.0.7") | |||
| .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | |||
| modelBuilder.Entity("MVCTemplate.Data.Data.Message", b => | |||
| { | |||
| b.Property<int>("Id") | |||
| .ValueGeneratedOnAdd() | |||
| .HasColumnType("int") | |||
| .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | |||
| b.Property<DateTime?>("ExpiryDate") | |||
| .HasColumnType("datetime2"); | |||
| b.Property<bool>("IsValid") | |||
| .HasColumnType("bit"); | |||
| b.Property<string>("Text") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.HasKey("Id"); | |||
| b.ToTable("Messages"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => | |||
| { | |||
| b.Property<string>("Id") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.Property<string>("ConcurrencyStamp") | |||
| .IsConcurrencyToken() | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("Name") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.Property<string>("NormalizedName") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.HasKey("Id"); | |||
| b.HasIndex("NormalizedName") | |||
| .IsUnique() | |||
| .HasDatabaseName("RoleNameIndex") | |||
| .HasFilter("[NormalizedName] IS NOT NULL"); | |||
| b.ToTable("AspNetRoles"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => | |||
| { | |||
| b.Property<int>("Id") | |||
| .ValueGeneratedOnAdd() | |||
| .HasColumnType("int") | |||
| .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | |||
| b.Property<string>("ClaimType") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("ClaimValue") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("RoleId") | |||
| .IsRequired() | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.HasKey("Id"); | |||
| b.HasIndex("RoleId"); | |||
| b.ToTable("AspNetRoleClaims"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b => | |||
| { | |||
| b.Property<string>("Id") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.Property<int>("AccessFailedCount") | |||
| .HasColumnType("int"); | |||
| b.Property<string>("ConcurrencyStamp") | |||
| .IsConcurrencyToken() | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("Email") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.Property<bool>("EmailConfirmed") | |||
| .HasColumnType("bit"); | |||
| b.Property<bool>("LockoutEnabled") | |||
| .HasColumnType("bit"); | |||
| b.Property<DateTimeOffset?>("LockoutEnd") | |||
| .HasColumnType("datetimeoffset"); | |||
| b.Property<string>("NormalizedEmail") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.Property<string>("NormalizedUserName") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.Property<string>("PasswordHash") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("PhoneNumber") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<bool>("PhoneNumberConfirmed") | |||
| .HasColumnType("bit"); | |||
| b.Property<string>("SecurityStamp") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<bool>("TwoFactorEnabled") | |||
| .HasColumnType("bit"); | |||
| b.Property<string>("UserName") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.HasKey("Id"); | |||
| b.HasIndex("NormalizedEmail") | |||
| .HasDatabaseName("EmailIndex"); | |||
| b.HasIndex("NormalizedUserName") | |||
| .IsUnique() | |||
| .HasDatabaseName("UserNameIndex") | |||
| .HasFilter("[NormalizedUserName] IS NOT NULL"); | |||
| b.ToTable("AspNetUsers"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b => | |||
| { | |||
| b.Property<int>("Id") | |||
| .ValueGeneratedOnAdd() | |||
| .HasColumnType("int") | |||
| .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | |||
| b.Property<string>("ClaimType") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("ClaimValue") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("UserId") | |||
| .IsRequired() | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.HasKey("Id"); | |||
| b.HasIndex("UserId"); | |||
| b.ToTable("AspNetUserClaims"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => | |||
| { | |||
| b.Property<string>("LoginProvider") | |||
| .HasMaxLength(128) | |||
| .HasColumnType("nvarchar(128)"); | |||
| b.Property<string>("ProviderKey") | |||
| .HasMaxLength(128) | |||
| .HasColumnType("nvarchar(128)"); | |||
| b.Property<string>("ProviderDisplayName") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("UserId") | |||
| .IsRequired() | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.HasKey("LoginProvider", "ProviderKey"); | |||
| b.HasIndex("UserId"); | |||
| b.ToTable("AspNetUserLogins"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b => | |||
| { | |||
| b.Property<string>("UserId") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.Property<string>("RoleId") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.HasKey("UserId", "RoleId"); | |||
| b.HasIndex("RoleId"); | |||
| b.ToTable("AspNetUserRoles"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b => | |||
| { | |||
| b.Property<string>("UserId") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.Property<string>("LoginProvider") | |||
| .HasMaxLength(128) | |||
| .HasColumnType("nvarchar(128)"); | |||
| b.Property<string>("Name") | |||
| .HasMaxLength(128) | |||
| .HasColumnType("nvarchar(128)"); | |||
| b.Property<string>("Value") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.HasKey("UserId", "LoginProvider", "Name"); | |||
| b.ToTable("AspNetUserTokens"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) | |||
| .WithMany() | |||
| .HasForeignKey("RoleId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) | |||
| .WithMany() | |||
| .HasForeignKey("UserId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) | |||
| .WithMany() | |||
| .HasForeignKey("UserId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) | |||
| .WithMany() | |||
| .HasForeignKey("RoleId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) | |||
| .WithMany() | |||
| .HasForeignKey("UserId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) | |||
| .WithMany() | |||
| .HasForeignKey("UserId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| #pragma warning restore 612, 618 | |||
| } | |||
| } | |||
| } | |||
| @@ -1,35 +0,0 @@ | |||
| using System; | |||
| using Microsoft.EntityFrameworkCore.Migrations; | |||
| namespace MVCTemplate.Data.Migrations | |||
| { | |||
| public partial class MessageExpiryDate : Migration | |||
| { | |||
| protected override void Up(MigrationBuilder migrationBuilder) | |||
| { | |||
| migrationBuilder.AddColumn<DateTime>( | |||
| name: "ExpiryDate", | |||
| table: "Messages", | |||
| type: "datetime2", | |||
| nullable: true); | |||
| migrationBuilder.AddColumn<bool>( | |||
| name: "IsValid", | |||
| table: "Messages", | |||
| type: "bit", | |||
| nullable: false, | |||
| defaultValue: false); | |||
| } | |||
| protected override void Down(MigrationBuilder migrationBuilder) | |||
| { | |||
| migrationBuilder.DropColumn( | |||
| name: "ExpiryDate", | |||
| table: "Messages"); | |||
| migrationBuilder.DropColumn( | |||
| name: "IsValid", | |||
| table: "Messages"); | |||
| } | |||
| } | |||
| } | |||
| @@ -1,296 +0,0 @@ | |||
| // <auto-generated /> | |||
| using System; | |||
| using MVCTemplate.Data.DbContexts; | |||
| using Microsoft.EntityFrameworkCore; | |||
| using Microsoft.EntityFrameworkCore.Infrastructure; | |||
| using Microsoft.EntityFrameworkCore.Metadata; | |||
| using Microsoft.EntityFrameworkCore.Storage.ValueConversion; | |||
| namespace MVCTemplate.Data.Migrations | |||
| { | |||
| [DbContext(typeof(AppDbContext))] | |||
| partial class AppDbContextModelSnapshot : ModelSnapshot | |||
| { | |||
| protected override void BuildModel(ModelBuilder modelBuilder) | |||
| { | |||
| #pragma warning disable 612, 618 | |||
| modelBuilder | |||
| .HasAnnotation("Relational:MaxIdentifierLength", 128) | |||
| .HasAnnotation("ProductVersion", "5.0.7") | |||
| .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | |||
| modelBuilder.Entity("MVCTemplate.Data.Data.Message", b => | |||
| { | |||
| b.Property<int>("Id") | |||
| .ValueGeneratedOnAdd() | |||
| .HasColumnType("int") | |||
| .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | |||
| b.Property<DateTime?>("ExpiryDate") | |||
| .HasColumnType("datetime2"); | |||
| b.Property<bool>("IsValid") | |||
| .HasColumnType("bit"); | |||
| b.Property<string>("Text") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.HasKey("Id"); | |||
| b.ToTable("Messages"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => | |||
| { | |||
| b.Property<string>("Id") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.Property<string>("ConcurrencyStamp") | |||
| .IsConcurrencyToken() | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("Name") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.Property<string>("NormalizedName") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.HasKey("Id"); | |||
| b.HasIndex("NormalizedName") | |||
| .IsUnique() | |||
| .HasDatabaseName("RoleNameIndex") | |||
| .HasFilter("[NormalizedName] IS NOT NULL"); | |||
| b.ToTable("AspNetRoles"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => | |||
| { | |||
| b.Property<int>("Id") | |||
| .ValueGeneratedOnAdd() | |||
| .HasColumnType("int") | |||
| .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | |||
| b.Property<string>("ClaimType") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("ClaimValue") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("RoleId") | |||
| .IsRequired() | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.HasKey("Id"); | |||
| b.HasIndex("RoleId"); | |||
| b.ToTable("AspNetRoleClaims"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b => | |||
| { | |||
| b.Property<string>("Id") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.Property<int>("AccessFailedCount") | |||
| .HasColumnType("int"); | |||
| b.Property<string>("ConcurrencyStamp") | |||
| .IsConcurrencyToken() | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("Email") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.Property<bool>("EmailConfirmed") | |||
| .HasColumnType("bit"); | |||
| b.Property<bool>("LockoutEnabled") | |||
| .HasColumnType("bit"); | |||
| b.Property<DateTimeOffset?>("LockoutEnd") | |||
| .HasColumnType("datetimeoffset"); | |||
| b.Property<string>("NormalizedEmail") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.Property<string>("NormalizedUserName") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.Property<string>("PasswordHash") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("PhoneNumber") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<bool>("PhoneNumberConfirmed") | |||
| .HasColumnType("bit"); | |||
| b.Property<string>("SecurityStamp") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<bool>("TwoFactorEnabled") | |||
| .HasColumnType("bit"); | |||
| b.Property<string>("UserName") | |||
| .HasMaxLength(256) | |||
| .HasColumnType("nvarchar(256)"); | |||
| b.HasKey("Id"); | |||
| b.HasIndex("NormalizedEmail") | |||
| .HasDatabaseName("EmailIndex"); | |||
| b.HasIndex("NormalizedUserName") | |||
| .IsUnique() | |||
| .HasDatabaseName("UserNameIndex") | |||
| .HasFilter("[NormalizedUserName] IS NOT NULL"); | |||
| b.ToTable("AspNetUsers"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b => | |||
| { | |||
| b.Property<int>("Id") | |||
| .ValueGeneratedOnAdd() | |||
| .HasColumnType("int") | |||
| .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | |||
| b.Property<string>("ClaimType") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("ClaimValue") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("UserId") | |||
| .IsRequired() | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.HasKey("Id"); | |||
| b.HasIndex("UserId"); | |||
| b.ToTable("AspNetUserClaims"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => | |||
| { | |||
| b.Property<string>("LoginProvider") | |||
| .HasMaxLength(128) | |||
| .HasColumnType("nvarchar(128)"); | |||
| b.Property<string>("ProviderKey") | |||
| .HasMaxLength(128) | |||
| .HasColumnType("nvarchar(128)"); | |||
| b.Property<string>("ProviderDisplayName") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.Property<string>("UserId") | |||
| .IsRequired() | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.HasKey("LoginProvider", "ProviderKey"); | |||
| b.HasIndex("UserId"); | |||
| b.ToTable("AspNetUserLogins"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b => | |||
| { | |||
| b.Property<string>("UserId") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.Property<string>("RoleId") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.HasKey("UserId", "RoleId"); | |||
| b.HasIndex("RoleId"); | |||
| b.ToTable("AspNetUserRoles"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b => | |||
| { | |||
| b.Property<string>("UserId") | |||
| .HasColumnType("nvarchar(450)"); | |||
| b.Property<string>("LoginProvider") | |||
| .HasMaxLength(128) | |||
| .HasColumnType("nvarchar(128)"); | |||
| b.Property<string>("Name") | |||
| .HasMaxLength(128) | |||
| .HasColumnType("nvarchar(128)"); | |||
| b.Property<string>("Value") | |||
| .HasColumnType("nvarchar(max)"); | |||
| b.HasKey("UserId", "LoginProvider", "Name"); | |||
| b.ToTable("AspNetUserTokens"); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) | |||
| .WithMany() | |||
| .HasForeignKey("RoleId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) | |||
| .WithMany() | |||
| .HasForeignKey("UserId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) | |||
| .WithMany() | |||
| .HasForeignKey("UserId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) | |||
| .WithMany() | |||
| .HasForeignKey("RoleId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) | |||
| .WithMany() | |||
| .HasForeignKey("UserId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b => | |||
| { | |||
| b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) | |||
| .WithMany() | |||
| .HasForeignKey("UserId") | |||
| .OnDelete(DeleteBehavior.Cascade) | |||
| .IsRequired(); | |||
| }); | |||
| #pragma warning restore 612, 618 | |||
| } | |||
| } | |||
| } | |||
| @@ -1,10 +0,0 @@ | |||
| is_global = true | |||
| build_property.TargetFramework = net5.0 | |||
| build_property.TargetPlatformMinVersion = | |||
| build_property.UsingMicrosoftNETSdkWeb = | |||
| build_property.ProjectTypeGuids = | |||
| build_property.PublishSingleFile = | |||
| build_property.IncludeAllContentForSelfExtract = | |||
| build_property._SupportedPlatformList = Android,iOS,Linux,macOS,Windows | |||
| build_property.RootNamespace = MVCTemplate.Data | |||
| build_property.ProjectDir = C:\Users\julija.stojkovic\source\repos\secure-sharing\MVCTemplate.Data\ | |||
| @@ -1,98 +0,0 @@ | |||
| { | |||
| "format": 1, | |||
| "restore": { | |||
| "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate.Data\\MVCTemplate.Data.csproj": {} | |||
| }, | |||
| "projects": { | |||
| "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate.Data\\MVCTemplate.Data.csproj": { | |||
| "version": "1.0.0", | |||
| "restore": { | |||
| "projectUniqueName": "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate.Data\\MVCTemplate.Data.csproj", | |||
| "projectName": "MVCTemplate.Data", | |||
| "projectPath": "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate.Data\\MVCTemplate.Data.csproj", | |||
| "packagesPath": "C:\\Users\\julija.stojkovic\\.nuget\\packages\\", | |||
| "outputPath": "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate.Data\\obj\\", | |||
| "projectStyle": "PackageReference", | |||
| "configFilePaths": [ | |||
| "C:\\Users\\julija.stojkovic\\AppData\\Roaming\\NuGet\\NuGet.Config", | |||
| "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" | |||
| ], | |||
| "originalTargetFrameworks": [ | |||
| "net5.0" | |||
| ], | |||
| "sources": { | |||
| "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, | |||
| "https://api.nuget.org/v3/index.json": {} | |||
| }, | |||
| "frameworks": { | |||
| "net5.0": { | |||
| "targetAlias": "net5.0", | |||
| "projectReferences": {} | |||
| } | |||
| }, | |||
| "warningProperties": { | |||
| "warnAsError": [ | |||
| "NU1605" | |||
| ] | |||
| } | |||
| }, | |||
| "frameworks": { | |||
| "net5.0": { | |||
| "targetAlias": "net5.0", | |||
| "dependencies": { | |||
| "AutoMapper": { | |||
| "target": "Package", | |||
| "version": "[11.0.1, )" | |||
| }, | |||
| "Microsoft.AspNetCore.Authentication.Google": { | |||
| "target": "Package", | |||
| "version": "[5.0.7, )" | |||
| }, | |||
| "Microsoft.AspNetCore.Identity.EntityFrameworkCore": { | |||
| "target": "Package", | |||
| "version": "[5.0.4, )" | |||
| }, | |||
| "Microsoft.EntityFrameworkCore": { | |||
| "target": "Package", | |||
| "version": "[5.0.7, )" | |||
| }, | |||
| "Microsoft.EntityFrameworkCore.SqlServer": { | |||
| "target": "Package", | |||
| "version": "[5.0.7, )" | |||
| }, | |||
| "Microsoft.EntityFrameworkCore.Tools": { | |||
| "include": "Runtime, Build, Native, ContentFiles, Analyzers, BuildTransitive", | |||
| "suppressParent": "All", | |||
| "target": "Package", | |||
| "version": "[5.0.4, )" | |||
| }, | |||
| "Microsoft.Extensions.Configuration": { | |||
| "target": "Package", | |||
| "version": "[5.0.0, )" | |||
| }, | |||
| "Microsoft.Extensions.Configuration.Json": { | |||
| "target": "Package", | |||
| "version": "[5.0.0, )" | |||
| } | |||
| }, | |||
| "imports": [ | |||
| "net461", | |||
| "net462", | |||
| "net47", | |||
| "net471", | |||
| "net472", | |||
| "net48" | |||
| ], | |||
| "assetTargetFallback": true, | |||
| "warn": true, | |||
| "frameworkReferences": { | |||
| "Microsoft.NETCore.App": { | |||
| "privateAssets": "all" | |||
| } | |||
| }, | |||
| "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.400\\RuntimeIdentifierGraph.json" | |||
| } | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @@ -1,25 +0,0 @@ | |||
| <?xml version="1.0" encoding="utf-8" standalone="no"?> | |||
| <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
| <PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' "> | |||
| <RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess> | |||
| <RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool> | |||
| <ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile> | |||
| <NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot> | |||
| <NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\julija.stojkovic\.nuget\packages\</NuGetPackageFolders> | |||
| <NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle> | |||
| <NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.11.0</NuGetToolVersion> | |||
| </PropertyGroup> | |||
| <ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' "> | |||
| <SourceRoot Include="C:\Users\julija.stojkovic\.nuget\packages\" /> | |||
| </ItemGroup> | |||
| <PropertyGroup> | |||
| <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects> | |||
| </PropertyGroup> | |||
| <ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' "> | |||
| <Import Project="$(NuGetPackageRoot)microsoft.entityframeworkcore.design\5.0.4\build\netcoreapp3.0\Microsoft.EntityFrameworkCore.Design.props" Condition="Exists('$(NuGetPackageRoot)microsoft.entityframeworkcore.design\5.0.4\build\netcoreapp3.0\Microsoft.EntityFrameworkCore.Design.props')" /> | |||
| </ImportGroup> | |||
| <PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' "> | |||
| <PkgNewtonsoft_Json Condition=" '$(PkgNewtonsoft_Json)' == '' ">C:\Users\julija.stojkovic\.nuget\packages\newtonsoft.json\10.0.1</PkgNewtonsoft_Json> | |||
| <PkgMicrosoft_EntityFrameworkCore_Tools Condition=" '$(PkgMicrosoft_EntityFrameworkCore_Tools)' == '' ">C:\Users\julija.stojkovic\.nuget\packages\microsoft.entityframeworkcore.tools\5.0.4</PkgMicrosoft_EntityFrameworkCore_Tools> | |||
| </PropertyGroup> | |||
| </Project> | |||
| @@ -1,6 +0,0 @@ | |||
| <?xml version="1.0" encoding="utf-8" standalone="no"?> | |||
| <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
| <PropertyGroup> | |||
| <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects> | |||
| </PropertyGroup> | |||
| </Project> | |||
| @@ -1,119 +0,0 @@ | |||
| { | |||
| "version": 2, | |||
| "dgSpecHash": "Ll18tzPtsqXilU3FxYQDvBtP6WtMPXvdFEaUpSX9luLtlo8u/mqzR86yIbKWPd4T9mUnUxFT/PfcoJvZZT8fZg==", | |||
| "success": true, | |||
| "projectFilePath": "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate.Data\\MVCTemplate.Data.csproj", | |||
| "expectedPackageFiles": [ | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\automapper\\11.0.1\\automapper.11.0.1.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\humanizer.core\\2.8.26\\humanizer.core.2.8.26.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.aspnetcore.authentication.google\\5.0.7\\microsoft.aspnetcore.authentication.google.5.0.7.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.aspnetcore.cryptography.internal\\5.0.4\\microsoft.aspnetcore.cryptography.internal.5.0.4.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.aspnetcore.cryptography.keyderivation\\5.0.4\\microsoft.aspnetcore.cryptography.keyderivation.5.0.4.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.aspnetcore.identity.entityframeworkcore\\5.0.4\\microsoft.aspnetcore.identity.entityframeworkcore.5.0.4.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.csharp\\4.7.0\\microsoft.csharp.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.data.sqlclient\\2.0.1\\microsoft.data.sqlclient.2.0.1.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.data.sqlclient.sni.runtime\\2.0.1\\microsoft.data.sqlclient.sni.runtime.2.0.1.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.entityframeworkcore\\5.0.7\\microsoft.entityframeworkcore.5.0.7.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.entityframeworkcore.abstractions\\5.0.7\\microsoft.entityframeworkcore.abstractions.5.0.7.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.entityframeworkcore.analyzers\\5.0.7\\microsoft.entityframeworkcore.analyzers.5.0.7.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.entityframeworkcore.design\\5.0.4\\microsoft.entityframeworkcore.design.5.0.4.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.entityframeworkcore.relational\\5.0.7\\microsoft.entityframeworkcore.relational.5.0.7.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.entityframeworkcore.sqlserver\\5.0.7\\microsoft.entityframeworkcore.sqlserver.5.0.7.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.entityframeworkcore.tools\\5.0.4\\microsoft.entityframeworkcore.tools.5.0.4.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.caching.abstractions\\5.0.0\\microsoft.extensions.caching.abstractions.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.caching.memory\\5.0.0\\microsoft.extensions.caching.memory.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.configuration\\5.0.0\\microsoft.extensions.configuration.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.configuration.abstractions\\5.0.0\\microsoft.extensions.configuration.abstractions.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.configuration.fileextensions\\5.0.0\\microsoft.extensions.configuration.fileextensions.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.configuration.json\\5.0.0\\microsoft.extensions.configuration.json.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.dependencyinjection\\5.0.1\\microsoft.extensions.dependencyinjection.5.0.1.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.dependencyinjection.abstractions\\5.0.0\\microsoft.extensions.dependencyinjection.abstractions.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.fileproviders.abstractions\\5.0.0\\microsoft.extensions.fileproviders.abstractions.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.fileproviders.physical\\5.0.0\\microsoft.extensions.fileproviders.physical.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.filesystemglobbing\\5.0.0\\microsoft.extensions.filesystemglobbing.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.identity.core\\5.0.4\\microsoft.extensions.identity.core.5.0.4.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.identity.stores\\5.0.4\\microsoft.extensions.identity.stores.5.0.4.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.logging\\5.0.0\\microsoft.extensions.logging.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.logging.abstractions\\5.0.0\\microsoft.extensions.logging.abstractions.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.options\\5.0.0\\microsoft.extensions.options.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.primitives\\5.0.0\\microsoft.extensions.primitives.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.identity.client\\4.14.0\\microsoft.identity.client.4.14.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.identitymodel.jsonwebtokens\\5.6.0\\microsoft.identitymodel.jsonwebtokens.5.6.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.identitymodel.logging\\5.6.0\\microsoft.identitymodel.logging.5.6.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.identitymodel.protocols\\5.6.0\\microsoft.identitymodel.protocols.5.6.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.identitymodel.protocols.openidconnect\\5.6.0\\microsoft.identitymodel.protocols.openidconnect.5.6.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.identitymodel.tokens\\5.6.0\\microsoft.identitymodel.tokens.5.6.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.netcore.platforms\\3.1.0\\microsoft.netcore.platforms.3.1.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.netcore.targets\\1.1.3\\microsoft.netcore.targets.1.1.3.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.win32.registry\\4.7.0\\microsoft.win32.registry.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.win32.systemevents\\4.7.0\\microsoft.win32.systemevents.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\newtonsoft.json\\10.0.1\\newtonsoft.json.10.0.1.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\runtime.native.system\\4.3.0\\runtime.native.system.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.collections\\4.3.0\\system.collections.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.collections.concurrent\\4.3.0\\system.collections.concurrent.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.collections.immutable\\5.0.0\\system.collections.immutable.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.collections.nongeneric\\4.3.0\\system.collections.nongeneric.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.collections.specialized\\4.3.0\\system.collections.specialized.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.componentmodel\\4.3.0\\system.componentmodel.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.componentmodel.annotations\\5.0.0\\system.componentmodel.annotations.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.componentmodel.primitives\\4.3.0\\system.componentmodel.primitives.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.componentmodel.typeconverter\\4.3.0\\system.componentmodel.typeconverter.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.configuration.configurationmanager\\4.7.0\\system.configuration.configurationmanager.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.diagnostics.debug\\4.3.0\\system.diagnostics.debug.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.diagnostics.diagnosticsource\\5.0.1\\system.diagnostics.diagnosticsource.5.0.1.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.diagnostics.tools\\4.3.0\\system.diagnostics.tools.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.diagnostics.tracing\\4.3.0\\system.diagnostics.tracing.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.drawing.common\\4.7.0\\system.drawing.common.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.dynamic.runtime\\4.3.0\\system.dynamic.runtime.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.globalization\\4.3.0\\system.globalization.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.globalization.extensions\\4.3.0\\system.globalization.extensions.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.identitymodel.tokens.jwt\\5.6.0\\system.identitymodel.tokens.jwt.5.6.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.io\\4.3.0\\system.io.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.io.filesystem\\4.3.0\\system.io.filesystem.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.io.filesystem.primitives\\4.3.0\\system.io.filesystem.primitives.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.linq\\4.3.0\\system.linq.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.linq.expressions\\4.3.0\\system.linq.expressions.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.net.nameresolution\\4.3.0\\system.net.nameresolution.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.net.primitives\\4.3.0\\system.net.primitives.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.objectmodel\\4.3.0\\system.objectmodel.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.private.datacontractserialization\\4.3.0\\system.private.datacontractserialization.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.private.uri\\4.3.2\\system.private.uri.4.3.2.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.reflection\\4.3.0\\system.reflection.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.reflection.emit\\4.3.0\\system.reflection.emit.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.reflection.emit.ilgeneration\\4.3.0\\system.reflection.emit.ilgeneration.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.reflection.emit.lightweight\\4.3.0\\system.reflection.emit.lightweight.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.reflection.extensions\\4.3.0\\system.reflection.extensions.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.reflection.primitives\\4.3.0\\system.reflection.primitives.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.reflection.typeextensions\\4.3.0\\system.reflection.typeextensions.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.resources.resourcemanager\\4.3.0\\system.resources.resourcemanager.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.runtime\\4.3.0\\system.runtime.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.runtime.caching\\4.7.0\\system.runtime.caching.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.runtime.extensions\\4.3.0\\system.runtime.extensions.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.runtime.handles\\4.3.0\\system.runtime.handles.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.runtime.interopservices\\4.3.0\\system.runtime.interopservices.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.runtime.numerics\\4.3.0\\system.runtime.numerics.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.runtime.serialization.formatters\\4.3.0\\system.runtime.serialization.formatters.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.runtime.serialization.json\\4.3.0\\system.runtime.serialization.json.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.runtime.serialization.primitives\\4.3.0\\system.runtime.serialization.primitives.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.security.accesscontrol\\4.7.0\\system.security.accesscontrol.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.security.cryptography.cng\\4.5.0\\system.security.cryptography.cng.4.5.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.security.cryptography.primitives\\4.3.0\\system.security.cryptography.primitives.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.security.cryptography.protecteddata\\4.7.0\\system.security.cryptography.protecteddata.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.security.permissions\\4.7.0\\system.security.permissions.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.security.principal.windows\\4.7.0\\system.security.principal.windows.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.security.securestring\\4.3.0\\system.security.securestring.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.text.encoding\\4.3.0\\system.text.encoding.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.text.encoding.codepages\\4.7.0\\system.text.encoding.codepages.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.text.encoding.extensions\\4.3.0\\system.text.encoding.extensions.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.text.regularexpressions\\4.3.0\\system.text.regularexpressions.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.threading\\4.3.0\\system.threading.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.threading.tasks\\4.3.0\\system.threading.tasks.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.threading.tasks.extensions\\4.3.0\\system.threading.tasks.extensions.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.windows.extensions\\4.7.0\\system.windows.extensions.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.xml.readerwriter\\4.3.0\\system.xml.readerwriter.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.xml.xdocument\\4.3.0\\system.xml.xdocument.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.xml.xmldocument\\4.3.0\\system.xml.xmldocument.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.xml.xmlserializer\\4.3.0\\system.xml.xmlserializer.4.3.0.nupkg.sha512" | |||
| ], | |||
| "logs": [] | |||
| } | |||
| @@ -1,44 +0,0 @@ | |||
| | |||
| Microsoft Visual Studio Solution File, Format Version 12.00 | |||
| # Visual Studio Version 16 | |||
| VisualStudioVersion = 16.0.31321.278 | |||
| MinimumVisualStudioVersion = 10.0.40219.1 | |||
| Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVCTemplate", "MVCTemplate\MVCTemplate.csproj", "{495FB586-0B0F-4368-87A3-C13444149D2A}" | |||
| ProjectSection(ProjectDependencies) = postProject | |||
| {941012BA-66F3-4B72-A735-CC199A3E4E7D} = {941012BA-66F3-4B72-A735-CC199A3E4E7D} | |||
| {263779FB-D285-44F3-BE46-81E019A17610} = {263779FB-D285-44F3-BE46-81E019A17610} | |||
| EndProjectSection | |||
| EndProject | |||
| Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVCTemplate.Business", "MVCTemplate.Business\MVCTemplate.Business.csproj", "{263779FB-D285-44F3-BE46-81E019A17610}" | |||
| ProjectSection(ProjectDependencies) = postProject | |||
| {941012BA-66F3-4B72-A735-CC199A3E4E7D} = {941012BA-66F3-4B72-A735-CC199A3E4E7D} | |||
| EndProjectSection | |||
| EndProject | |||
| Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MVCTemplate.Data", "MVCTemplate.Data\MVCTemplate.Data.csproj", "{941012BA-66F3-4B72-A735-CC199A3E4E7D}" | |||
| EndProject | |||
| Global | |||
| GlobalSection(SolutionConfigurationPlatforms) = preSolution | |||
| Debug|Any CPU = Debug|Any CPU | |||
| Release|Any CPU = Release|Any CPU | |||
| EndGlobalSection | |||
| GlobalSection(ProjectConfigurationPlatforms) = postSolution | |||
| {495FB586-0B0F-4368-87A3-C13444149D2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||
| {495FB586-0B0F-4368-87A3-C13444149D2A}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||
| {495FB586-0B0F-4368-87A3-C13444149D2A}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||
| {495FB586-0B0F-4368-87A3-C13444149D2A}.Release|Any CPU.Build.0 = Release|Any CPU | |||
| {263779FB-D285-44F3-BE46-81E019A17610}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||
| {263779FB-D285-44F3-BE46-81E019A17610}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||
| {263779FB-D285-44F3-BE46-81E019A17610}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||
| {263779FB-D285-44F3-BE46-81E019A17610}.Release|Any CPU.Build.0 = Release|Any CPU | |||
| {941012BA-66F3-4B72-A735-CC199A3E4E7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||
| {941012BA-66F3-4B72-A735-CC199A3E4E7D}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||
| {941012BA-66F3-4B72-A735-CC199A3E4E7D}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||
| {941012BA-66F3-4B72-A735-CC199A3E4E7D}.Release|Any CPU.Build.0 = Release|Any CPU | |||
| EndGlobalSection | |||
| GlobalSection(SolutionProperties) = preSolution | |||
| HideSolutionNode = FALSE | |||
| EndGlobalSection | |||
| GlobalSection(ExtensibilityGlobals) = postSolution | |||
| SolutionGuid = {8D821E45-1525-4207-A292-08C0388BBF06} | |||
| EndGlobalSection | |||
| EndGlobal | |||
| @@ -1,23 +0,0 @@ | |||
| 2022-09-06 15:52:31.201 +02:00 [ERR] Unhandled Exception | |||
| System.InvalidOperationException: RenderBody has not been called for the page at '/Views/Shared/_LayoutAdmin.cshtml'. To ignore call IgnoreBody(). | |||
| at Microsoft.AspNetCore.Mvc.Razor.RazorPage.EnsureRenderedBodyOrSections() | |||
| at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderLayoutAsync(ViewContext context, ViewBufferTextWriter bodyWriter) | |||
| at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context) | |||
| at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode) | |||
| at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode) | |||
| at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ActionContext actionContext, IView view, ViewDataDictionary viewData, ITempDataDictionary tempData, String contentType, Nullable`1 statusCode) | |||
| at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor.ExecuteAsync(ActionContext context, ViewResult result) | |||
| at Microsoft.AspNetCore.Mvc.ViewResult.ExecuteResultAsync(ActionContext context) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsync>g__Awaited|29_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters() | |||
| --- End of stack trace from previous location --- | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync() | |||
| --- End of stack trace from previous location --- | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) | |||
| at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger) | |||
| at MVCTemplate.Infrastructure.Middleware.ExceptionHandlingMiddleware.Invoke(HttpContext context) in C:\Users\julija.stojkovic\Downloads\ScreeningTestApp\MVCTemplate\MVCTemplate\Infrastructure\Middleware\ExceptionHandlingMiddleware.cs:line 32 | |||
| @@ -1,86 +0,0 @@ | |||
| 2022-09-08 13:38:14.554 +02:00 [ERR] Unhandled Exception | |||
| System.InvalidOperationException: Unable to resolve service for type 'MVCTemplate.Business.Interfaces.IMessageService' while attempting to activate 'MVCTemplate.Controllers.HomeController'. | |||
| at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.GetService(IServiceProvider sp, Type type, Type requiredBy, Boolean isDefaultParameterRequired) | |||
| at lambda_method116(Closure , IServiceProvider , Object[] ) | |||
| at Microsoft.AspNetCore.Mvc.Controllers.ControllerActivatorProvider.<>c__DisplayClass4_0.<CreateActivator>b__0(ControllerContext controllerContext) | |||
| at Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider.<>c__DisplayClass5_0.<CreateControllerFactory>g__CreateController|0(ControllerContext controllerContext) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync() | |||
| --- End of stack trace from previous location --- | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync() | |||
| --- End of stack trace from previous location --- | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) | |||
| at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger) | |||
| at MVCTemplate.Infrastructure.Middleware.ExceptionHandlingMiddleware.Invoke(HttpContext context) in C:\Users\julija.stojkovic\Downloads\ScreeningTestApp\MVCTemplate\MVCTemplate\Infrastructure\Middleware\ExceptionHandlingMiddleware.cs:line 32 | |||
| 2022-09-08 13:55:46.928 +02:00 [ERR] Unhandled Exception | |||
| Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while updating the entries. See the inner exception for details. | |||
| ---> Microsoft.Data.SqlClient.SqlException (0x80131904): Invalid object name 'Messages'. | |||
| at Microsoft.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__169_0(Task`1 result) | |||
| at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke() | |||
| at System.Threading.Tasks.Task.<>c.<.cctor>b__277_0(Object obj) | |||
| at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) | |||
| --- End of stack trace from previous location --- | |||
| at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) | |||
| at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) | |||
| --- End of stack trace from previous location --- | |||
| at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) | |||
| at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) | |||
| at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) | |||
| ClientConnectionId:a2541bc2-ce52-4fa8-b776-d4fa016ed53a | |||
| Error Number:208,State:1,Class:16 | |||
| --- End of inner exception stack trace --- | |||
| at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) | |||
| at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) | |||
| at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) | |||
| at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) | |||
| at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken) | |||
| at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(DbContext _, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) | |||
| at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken) | |||
| at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) | |||
| at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) | |||
| at MVCTemplate.Business.Services.MessageService.Create(MessageDto messageDto) in C:\Users\julija.stojkovic\Downloads\ScreeningTestApp\MVCTemplate\MVCTemplate.Business\Services\MessageService.cs:line 30 | |||
| at MVCTemplate.Controllers.HomeController.CreateMessage(MessageModel model) in C:\Users\julija.stojkovic\Downloads\ScreeningTestApp\MVCTemplate\MVCTemplate\Controllers\HomeController.cs:line 40 | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) | |||
| at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger) | |||
| at MVCTemplate.Infrastructure.Middleware.ExceptionHandlingMiddleware.Invoke(HttpContext context) in C:\Users\julija.stojkovic\Downloads\ScreeningTestApp\MVCTemplate\MVCTemplate\Infrastructure\Middleware\ExceptionHandlingMiddleware.cs:line 32 | |||
| 2022-09-08 13:58:35.485 +02:00 [ERR] Unhandled Exception | |||
| System.InvalidOperationException: The model item passed into the ViewDataDictionary is of type 'MVCTemplate.Models.LinkModel', but this ViewDataDictionary instance requires a model item of type 'MVCTemplate.Models.MessageModel'. | |||
| at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.EnsureCompatible(Object value) | |||
| at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary..ctor(ViewDataDictionary source, Object model, Type declaredModelType) | |||
| at lambda_method78(Closure , ViewDataDictionary ) | |||
| at Microsoft.AspNetCore.Mvc.Razor.RazorPagePropertyActivator.CreateViewDataDictionary(ViewContext context) | |||
| at Microsoft.AspNetCore.Mvc.Razor.RazorPagePropertyActivator.Activate(Object page, ViewContext context) | |||
| at Microsoft.AspNetCore.Mvc.Razor.RazorPageActivator.Activate(IRazorPage page, ViewContext context) | |||
| at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context) | |||
| at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, Boolean invokeViewStarts) | |||
| at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context) | |||
| at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode) | |||
| at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode) | |||
| at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ActionContext actionContext, IView view, ViewDataDictionary viewData, ITempDataDictionary tempData, String contentType, Nullable`1 statusCode) | |||
| at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor.ExecuteAsync(ActionContext context, ViewResult result) | |||
| at Microsoft.AspNetCore.Mvc.ViewResult.ExecuteResultAsync(ActionContext context) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsync>g__Awaited|29_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters() | |||
| --- End of stack trace from previous location --- | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) | |||
| at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger) | |||
| at MVCTemplate.Infrastructure.Middleware.ExceptionHandlingMiddleware.Invoke(HttpContext context) in C:\Users\julija.stojkovic\Downloads\ScreeningTestApp\MVCTemplate\MVCTemplate\Infrastructure\Middleware\ExceptionHandlingMiddleware.cs:line 32 | |||
| @@ -1,58 +0,0 @@ | |||
| 2022-09-09 12:53:11.393 +02:00 [ERR] Unhandled Exception | |||
| Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while updating the entries. See the inner exception for details. | |||
| ---> Microsoft.Data.SqlClient.SqlException (0x80131904): Invalid column name 'ExpiryDate'. | |||
| Invalid column name 'IsValid'. | |||
| at Microsoft.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__169_0(Task`1 result) | |||
| at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke() | |||
| at System.Threading.Tasks.Task.<>c.<.cctor>b__277_0(Object obj) | |||
| at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) | |||
| --- End of stack trace from previous location --- | |||
| at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) | |||
| at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) | |||
| --- End of stack trace from previous location --- | |||
| at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) | |||
| at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) | |||
| at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) | |||
| ClientConnectionId:ec79080e-c32a-473b-b268-e4e937dc4e88 | |||
| Error Number:207,State:1,Class:16 | |||
| --- End of inner exception stack trace --- | |||
| at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) | |||
| at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) | |||
| at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) | |||
| at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) | |||
| at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken) | |||
| at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(DbContext _, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) | |||
| at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken) | |||
| at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) | |||
| at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) | |||
| at MVCTemplate.Business.Services.MessageService.Create(MessageDto messageDto) in C:\Users\julija.stojkovic\Downloads\ScreeningTestApp\MVCTemplate\MVCTemplate.Business\Services\MessageService.cs:line 30 | |||
| at MVCTemplate.Controllers.HomeController.CreateMessage(MessageModel model) in C:\Users\julija.stojkovic\Downloads\ScreeningTestApp\MVCTemplate\MVCTemplate\Controllers\HomeController.cs:line 58 | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) | |||
| at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger) | |||
| at MVCTemplate.Infrastructure.Middleware.ExceptionHandlingMiddleware.Invoke(HttpContext context) in C:\Users\julija.stojkovic\Downloads\ScreeningTestApp\MVCTemplate\MVCTemplate\Infrastructure\Middleware\ExceptionHandlingMiddleware.cs:line 32 | |||
| 2022-09-09 14:38:20.201 +02:00 [ERR] Unhandled Exception | |||
| System.NullReferenceException: Object reference not set to an instance of an object. | |||
| at MVCTemplate.Controllers.HomeController.Link(Int32 id, Nullable`1 share) in C:\Users\julija.stojkovic\Downloads\ScreeningTestApp\MVCTemplate\MVCTemplate\Controllers\HomeController.cs:line 69 | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) | |||
| at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) | |||
| at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger) | |||
| at MVCTemplate.Infrastructure.Middleware.ExceptionHandlingMiddleware.Invoke(HttpContext context) in C:\Users\julija.stojkovic\Downloads\ScreeningTestApp\MVCTemplate\MVCTemplate\Infrastructure\Middleware\ExceptionHandlingMiddleware.cs:line 32 | |||
| @@ -1,21 +0,0 @@ | |||
| using System; | |||
| using Microsoft.AspNetCore.Hosting; | |||
| using Microsoft.AspNetCore.Identity; | |||
| using Microsoft.AspNetCore.Identity.UI; | |||
| using Microsoft.EntityFrameworkCore; | |||
| using Microsoft.Extensions.Configuration; | |||
| using Microsoft.Extensions.DependencyInjection; | |||
| using MVCTemplate.Data.DbContexts; | |||
| [assembly: HostingStartup(typeof(MVCTemplate.Areas.Identity.IdentityHostingStartup))] | |||
| namespace MVCTemplate.Areas.Identity | |||
| { | |||
| public class IdentityHostingStartup : IHostingStartup | |||
| { | |||
| public void Configure(IWebHostBuilder builder) | |||
| { | |||
| builder.ConfigureServices((context, services) => { | |||
| }); | |||
| } | |||
| } | |||
| } | |||
| @@ -1,110 +0,0 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.ComponentModel.DataAnnotations; | |||
| using System.Linq; | |||
| using System.Text.Encodings.Web; | |||
| using System.Threading.Tasks; | |||
| using Microsoft.AspNetCore.Authorization; | |||
| using Microsoft.AspNetCore.Authentication; | |||
| using Microsoft.AspNetCore.Identity; | |||
| using Microsoft.AspNetCore.Identity.UI.Services; | |||
| using Microsoft.AspNetCore.Mvc; | |||
| using Microsoft.AspNetCore.Mvc.RazorPages; | |||
| using Microsoft.Extensions.Logging; | |||
| namespace MVCTemplate.Areas.Identity.Pages.Account | |||
| { | |||
| [AllowAnonymous] | |||
| public class LoginModel : PageModel | |||
| { | |||
| private readonly UserManager<IdentityUser> _userManager; | |||
| private readonly SignInManager<IdentityUser> _signInManager; | |||
| private readonly ILogger<LoginModel> _logger; | |||
| public LoginModel(SignInManager<IdentityUser> signInManager, | |||
| ILogger<LoginModel> logger, | |||
| UserManager<IdentityUser> userManager) | |||
| { | |||
| _userManager = userManager; | |||
| _signInManager = signInManager; | |||
| _logger = logger; | |||
| } | |||
| [BindProperty] | |||
| public InputModel Input { get; set; } | |||
| public IList<AuthenticationScheme> ExternalLogins { get; set; } | |||
| public string ReturnUrl { get; set; } | |||
| [TempData] | |||
| public string ErrorMessage { get; set; } | |||
| public class InputModel | |||
| { | |||
| [Required] | |||
| [EmailAddress] | |||
| public string Email { get; set; } | |||
| [Required] | |||
| [DataType(DataType.Password)] | |||
| public string Password { get; set; } | |||
| [Display(Name = "Remember me?")] | |||
| public bool RememberMe { get; set; } | |||
| } | |||
| public async Task OnGetAsync(string returnUrl = null) | |||
| { | |||
| if (!string.IsNullOrEmpty(ErrorMessage)) | |||
| { | |||
| ModelState.AddModelError(string.Empty, ErrorMessage); | |||
| } | |||
| returnUrl ??= Url.Content("~/"); | |||
| // Clear the existing external cookie to ensure a clean login process | |||
| await HttpContext.SignOutAsync(IdentityConstants.ExternalScheme); | |||
| ExternalLogins = (await _signInManager.GetExternalAuthenticationSchemesAsync()).ToList(); | |||
| ReturnUrl = returnUrl; | |||
| } | |||
| public async Task<IActionResult> OnPostAsync(string returnUrl = null) | |||
| { | |||
| returnUrl ??= Url.Content("~/"); | |||
| ExternalLogins = (await _signInManager.GetExternalAuthenticationSchemesAsync()).ToList(); | |||
| if (ModelState.IsValid) | |||
| { | |||
| // This doesn't count login failures towards account lockout | |||
| // To enable password failures to trigger account lockout, set lockoutOnFailure: true | |||
| var result = await _signInManager.PasswordSignInAsync(Input.Email, Input.Password, Input.RememberMe, lockoutOnFailure: false); | |||
| if (result.Succeeded) | |||
| { | |||
| _logger.LogInformation("User logged in."); | |||
| return LocalRedirect(returnUrl); | |||
| } | |||
| if (result.RequiresTwoFactor) | |||
| { | |||
| return RedirectToPage("./LoginWith2fa", new { ReturnUrl = returnUrl, RememberMe = Input.RememberMe }); | |||
| } | |||
| if (result.IsLockedOut) | |||
| { | |||
| _logger.LogWarning("User account locked out."); | |||
| return RedirectToPage("./Lockout"); | |||
| } | |||
| else | |||
| { | |||
| ModelState.AddModelError(string.Empty, "Invalid login attempt."); | |||
| return Page(); | |||
| } | |||
| } | |||
| // If we got this far, something failed, redisplay form | |||
| return Page(); | |||
| } | |||
| } | |||
| } | |||
| @@ -1,114 +0,0 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.ComponentModel.DataAnnotations; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Text.Encodings.Web; | |||
| using System.Threading.Tasks; | |||
| using Microsoft.AspNetCore.Authentication; | |||
| using Microsoft.AspNetCore.Authorization; | |||
| using Microsoft.AspNetCore.Identity; | |||
| using Microsoft.AspNetCore.Identity.UI.Services; | |||
| using Microsoft.AspNetCore.Mvc; | |||
| using Microsoft.AspNetCore.Mvc.RazorPages; | |||
| using Microsoft.AspNetCore.WebUtilities; | |||
| using Microsoft.Extensions.Logging; | |||
| namespace MVCTemplate.Areas.Identity.Pages.Account | |||
| { | |||
| [AllowAnonymous] | |||
| public class RegisterModel : PageModel | |||
| { | |||
| private readonly SignInManager<IdentityUser> _signInManager; | |||
| private readonly UserManager<IdentityUser> _userManager; | |||
| private readonly ILogger<RegisterModel> _logger; | |||
| private readonly IEmailSender _emailSender; | |||
| public RegisterModel( | |||
| UserManager<IdentityUser> userManager, | |||
| SignInManager<IdentityUser> signInManager, | |||
| ILogger<RegisterModel> logger, | |||
| IEmailSender emailSender) | |||
| { | |||
| _userManager = userManager; | |||
| _signInManager = signInManager; | |||
| _logger = logger; | |||
| _emailSender = emailSender; | |||
| } | |||
| [BindProperty] | |||
| public InputModel Input { get; set; } | |||
| public string ReturnUrl { get; set; } | |||
| public IList<AuthenticationScheme> ExternalLogins { get; set; } | |||
| public class InputModel | |||
| { | |||
| [Required] | |||
| [EmailAddress] | |||
| [Display(Name = "Email")] | |||
| public string Email { get; set; } | |||
| [Required] | |||
| [StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)] | |||
| [DataType(DataType.Password)] | |||
| [Display(Name = "Password")] | |||
| public string Password { get; set; } | |||
| [DataType(DataType.Password)] | |||
| [Display(Name = "Confirm password")] | |||
| [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")] | |||
| public string ConfirmPassword { get; set; } | |||
| } | |||
| public async Task OnGetAsync(string returnUrl = null) | |||
| { | |||
| ReturnUrl = returnUrl; | |||
| ExternalLogins = (await _signInManager.GetExternalAuthenticationSchemesAsync()).ToList(); | |||
| } | |||
| public async Task<IActionResult> OnPostAsync(string returnUrl = null) | |||
| { | |||
| returnUrl ??= Url.Content("~/"); | |||
| ExternalLogins = (await _signInManager.GetExternalAuthenticationSchemesAsync()).ToList(); | |||
| if (ModelState.IsValid) | |||
| { | |||
| var user = new IdentityUser { UserName = Input.Email, Email = Input.Email }; | |||
| var result = await _userManager.CreateAsync(user, Input.Password); | |||
| if (result.Succeeded) | |||
| { | |||
| _logger.LogInformation("User created a new account with password."); | |||
| var code = await _userManager.GenerateEmailConfirmationTokenAsync(user); | |||
| code = WebEncoders.Base64UrlEncode(Encoding.UTF8.GetBytes(code)); | |||
| var callbackUrl = Url.Page( | |||
| "/Account/ConfirmEmail", | |||
| pageHandler: null, | |||
| values: new { area = "Identity", userId = user.Id, code = code, returnUrl = returnUrl }, | |||
| protocol: Request.Scheme); | |||
| await _emailSender.SendEmailAsync(Input.Email, "Confirm your email", | |||
| $"Please confirm your account by <a href='{HtmlEncoder.Default.Encode(callbackUrl)}'>clicking here</a>."); | |||
| if (_userManager.Options.SignIn.RequireConfirmedAccount) | |||
| { | |||
| return RedirectToPage("RegisterConfirmation", new { email = Input.Email, returnUrl = returnUrl }); | |||
| } | |||
| else | |||
| { | |||
| await _signInManager.SignInAsync(user, isPersistent: false); | |||
| return LocalRedirect(returnUrl); | |||
| } | |||
| } | |||
| foreach (var error in result.Errors) | |||
| { | |||
| ModelState.AddModelError(string.Empty, error.Description); | |||
| } | |||
| } | |||
| // If we got this far, something failed, redisplay form | |||
| return Page(); | |||
| } | |||
| } | |||
| } | |||
| @@ -1,91 +0,0 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.ComponentModel.DataAnnotations; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| using System.Web; | |||
| using Microsoft.AspNetCore.Authorization; | |||
| using Microsoft.AspNetCore.Identity; | |||
| using Microsoft.AspNetCore.Mvc; | |||
| using Microsoft.AspNetCore.Mvc.RazorPages; | |||
| using Microsoft.AspNetCore.WebUtilities; | |||
| namespace MVCTemplate.Areas.Identity.Pages.Account | |||
| { | |||
| [AllowAnonymous] | |||
| public class ResetPasswordModel : PageModel | |||
| { | |||
| private readonly UserManager<IdentityUser> _userManager; | |||
| public ResetPasswordModel(UserManager<IdentityUser> userManager) | |||
| { | |||
| _userManager = userManager; | |||
| } | |||
| [BindProperty] | |||
| public InputModel Input { get; set; } | |||
| public class InputModel | |||
| { | |||
| [Required] | |||
| [EmailAddress] | |||
| public string Email { get; set; } | |||
| [Required] | |||
| [StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)] | |||
| [DataType(DataType.Password)] | |||
| public string Password { get; set; } | |||
| [DataType(DataType.Password)] | |||
| [Display(Name = "Confirm password")] | |||
| [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")] | |||
| public string ConfirmPassword { get; set; } | |||
| public string Code { get; set; } | |||
| } | |||
| public IActionResult OnGet(string code = null) | |||
| { | |||
| if (code == null) | |||
| { | |||
| return BadRequest("A code must be supplied for password reset."); | |||
| } | |||
| else | |||
| { | |||
| Input = new InputModel | |||
| { | |||
| Code = code | |||
| }; | |||
| return Page(); | |||
| } | |||
| } | |||
| public async Task<IActionResult> OnPostAsync() | |||
| { | |||
| if (!ModelState.IsValid) | |||
| { | |||
| return Page(); | |||
| } | |||
| var user = await _userManager.FindByEmailAsync(Input.Email); | |||
| if (user == null) | |||
| { | |||
| // Don't reveal that the user does not exist | |||
| return RedirectToPage("./ResetPasswordConfirmation"); | |||
| } | |||
| var result = await _userManager.ResetPasswordAsync(user, Input.Code, Input.Password); | |||
| if (result.Succeeded) | |||
| { | |||
| return RedirectToPage("./ResetPasswordConfirmation"); | |||
| } | |||
| foreach (var error in result.Errors) | |||
| { | |||
| ModelState.AddModelError(string.Empty, error.Description); | |||
| } | |||
| return Page(); | |||
| } | |||
| } | |||
| } | |||
| @@ -1 +0,0 @@ | |||
| @using MVCTemplate.Areas.Identity.Pages.Account | |||
| @@ -1,4 +0,0 @@ | |||
| @using Microsoft.AspNetCore.Identity | |||
| @using MVCTemplate.Areas.Identity | |||
| @using MVCTemplate.Areas.Identity.Pages | |||
| @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers | |||
| @@ -1,63 +0,0 @@ | |||
| using Microsoft.AspNetCore.Authorization; | |||
| using Microsoft.AspNetCore.Mvc; | |||
| using Microsoft.Extensions.Logging; | |||
| using Newtonsoft.Json; | |||
| using MVCTemplate.Business.Dtos; | |||
| using MVCTemplate.Models; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Diagnostics; | |||
| using System.Linq; | |||
| using System.Threading.Tasks; | |||
| using MVCTemplate.Business.Interfaces; | |||
| using MVCTemplate.Infrastructure; | |||
| namespace MVCTemplate.Controllers | |||
| { | |||
| [Authorize] | |||
| public class HomeController : Controller | |||
| { | |||
| private readonly ILogger<HomeController> _logger; | |||
| private readonly IMessageService _messageService; | |||
| private readonly IModelFactory _modelFactory; | |||
| public HomeController(ILogger<HomeController> logger, IMessageService messageService, IModelFactory modelFactory) | |||
| { | |||
| _logger = logger; | |||
| _messageService = messageService; | |||
| _modelFactory = modelFactory; | |||
| } | |||
| public IActionResult Index() | |||
| { | |||
| return View(); | |||
| } | |||
| [HttpPost] | |||
| public async Task<IActionResult> CreateMessage(MessageModel model) | |||
| { | |||
| MessageDto message = new MessageDto { Text = model.Text}; | |||
| int id = await _messageService.Create(message, model.ChosenPeriod); | |||
| return RedirectToAction("Link", "Home", new { id = id, share = true }); | |||
| } | |||
| [HttpGet] | |||
| public async Task<IActionResult> Link(int id, bool? share) | |||
| { | |||
| var model = await _modelFactory.PrepareLinkVM(id, share); | |||
| return View(model); | |||
| } | |||
| public IActionResult Privacy() | |||
| { | |||
| return View(); | |||
| } | |||
| } | |||
| } | |||
| @@ -1,12 +0,0 @@ | |||
| using MVCTemplate.Business.Dtos; | |||
| using MVCTemplate.Models; | |||
| using System.Threading.Tasks; | |||
| namespace MVCTemplate.Infrastructure | |||
| { | |||
| public interface IModelFactory | |||
| { | |||
| //public MessageModel PrepareMessageVM(MessageDto message); | |||
| public Task<LinkModel> PrepareLinkVM(int id, bool? share); | |||
| } | |||
| } | |||
| @@ -1,66 +0,0 @@ | |||
| using Microsoft.AspNetCore.Hosting; | |||
| using Microsoft.AspNetCore.Http; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Net; | |||
| using System.Threading.Tasks; | |||
| using Newtonsoft.Json; | |||
| using Serilog; | |||
| namespace MVCTemplate.Infrastructure.Middleware | |||
| { | |||
| public class ExceptionHandlingMiddleware | |||
| { | |||
| private RequestDelegate nextRequestDelegate; | |||
| private IWebHostEnvironment environment; | |||
| public ExceptionHandlingMiddleware( | |||
| RequestDelegate nextRequestDelegate, | |||
| IWebHostEnvironment environment | |||
| ) | |||
| { | |||
| this.nextRequestDelegate = nextRequestDelegate ?? throw new ArgumentNullException(nameof(nextRequestDelegate)); | |||
| this.environment = environment ?? throw new ArgumentNullException(nameof(environment)); | |||
| } | |||
| public async Task Invoke(HttpContext context) | |||
| { | |||
| try | |||
| { | |||
| context.TraceIdentifier = Guid.NewGuid().ToString(); | |||
| await this.nextRequestDelegate(context); | |||
| } | |||
| catch (Exception ex) | |||
| { | |||
| await this.HandleGlobalExceptionAsync(context, ex); | |||
| } | |||
| } | |||
| private async Task HandleGlobalExceptionAsync(HttpContext context, Exception ex) | |||
| { | |||
| try | |||
| { | |||
| await this.WriteResponseAsync(context, HttpStatusCode.InternalServerError, JsonConvert.SerializeObject(ex.Message)); | |||
| } | |||
| catch (Exception e) | |||
| { | |||
| await this.WriteResponseAsync(context, HttpStatusCode.InternalServerError, JsonConvert.SerializeObject(e.Message)); | |||
| } | |||
| var logger = new LoggerConfiguration() | |||
| .MinimumLevel.Debug() | |||
| .WriteTo.File(@"AppData\Errors\log-.log", rollingInterval: RollingInterval.Day) | |||
| .CreateLogger(); | |||
| logger.Error(ex, "Unhandled Exception"/* - Detected UserId: {UserId}" /*, context.User.GetUserId()*/); | |||
| } | |||
| private async Task WriteResponseAsync(HttpContext context, HttpStatusCode code, string jsonResponse) | |||
| { | |||
| context.Response.ContentType = "application/json"; | |||
| context.Response.StatusCode = (int)code; | |||
| await context.Response.WriteAsync(jsonResponse); | |||
| } | |||
| } | |||
| } | |||
| @@ -1,65 +0,0 @@ | |||
| using MVCTemplate.Business.Dtos; | |||
| using MVCTemplate.Business.Interfaces; | |||
| using MVCTemplate.Models; | |||
| using System; | |||
| using System.Threading.Tasks; | |||
| namespace MVCTemplate.Infrastructure | |||
| { | |||
| public class ModelFactory : IModelFactory | |||
| { | |||
| private readonly IMessageService _messageService; | |||
| public ModelFactory(IMessageService messageService) | |||
| { | |||
| _messageService = messageService; | |||
| } | |||
| public async Task<LinkModel> PrepareLinkVM(int id, bool? share) | |||
| { | |||
| //share is true when the link is created | |||
| LinkModel model = null; | |||
| try | |||
| { | |||
| MessageDto message = await _messageService.GetById(id); | |||
| model = new LinkModel { message = new MessageModel { Id = id, Text = message.Text }, Share = share }; | |||
| model.IsValid = message.IsValid; | |||
| if (model.IsValid) | |||
| { | |||
| if (message.ExpiryDate != null) | |||
| { | |||
| model.TimeLeft = message.ExpiryDate - DateTime.UtcNow; | |||
| if (message.ExpiryDate <= DateTime.UtcNow) | |||
| { | |||
| await _messageService.InvalidateMessage(message.Id); | |||
| model.IsValid = false; | |||
| } | |||
| } | |||
| else | |||
| { | |||
| //ONE_TIME sharing: make the message invalid now so that it can't be accessed next time | |||
| if (share == null || share.Value == false) | |||
| { | |||
| await _messageService.InvalidateMessage(message.Id); | |||
| } | |||
| } | |||
| } | |||
| } | |||
| catch (Exception e) | |||
| { | |||
| model = new LinkModel { IsValid = false }; | |||
| } | |||
| return model; | |||
| } | |||
| //public MessageModel PrepareMessageVM(MessageDto message) | |||
| //{ | |||
| // throw new System.NotImplementedException(); | |||
| //} | |||
| } | |||
| } | |||
| @@ -1,36 +0,0 @@ | |||
| <Project Sdk="Microsoft.NET.Sdk.Web"> | |||
| <PropertyGroup> | |||
| <TargetFramework>net5.0</TargetFramework> | |||
| <CopyRefAssembliesToPublishDirectory>false</CopyRefAssembliesToPublishDirectory> | |||
| </PropertyGroup> | |||
| <ItemGroup> | |||
| <PackageReference Include="AutoMapper" Version="11.0.1" /> | |||
| <PackageReference Include="Microsoft.AspNet.Identity.Core" Version="2.2.3" /> | |||
| <PackageReference Include="Microsoft.AspNetCore.Authentication.Google" Version="5.0.7" /> | |||
| <PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="5.0.6" /> | |||
| <PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.6" /> | |||
| <PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="5.0.7" /> | |||
| <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.7" /> | |||
| <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.6"> | |||
| <PrivateAssets>all</PrivateAssets> | |||
| <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | |||
| </PackageReference> | |||
| <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="5.0.2" /> | |||
| <PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> | |||
| <PackageReference Include="Quartz" Version="3.4.0" /> | |||
| <PackageReference Include="Serilog" Version="2.10.0" /> | |||
| <PackageReference Include="Serilog.AspNetCore" Version="4.1.0" /> | |||
| </ItemGroup> | |||
| <ItemGroup> | |||
| <ProjectReference Include="..\MVCTemplate.Business\MVCTemplate.Business.csproj" /> | |||
| <ProjectReference Include="..\MVCTemplate.Data\MVCTemplate.Data.csproj" /> | |||
| </ItemGroup> | |||
| <ItemGroup> | |||
| <Folder Include="AppData\Errors\" /> | |||
| </ItemGroup> | |||
| </Project> | |||
| @@ -1,11 +0,0 @@ | |||
| using System; | |||
| namespace MVCTemplate.Models | |||
| { | |||
| public class ErrorViewModel | |||
| { | |||
| public string RequestId { get; set; } | |||
| public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); | |||
| } | |||
| } | |||
| @@ -1,14 +0,0 @@ | |||
| using System; | |||
| namespace MVCTemplate.Models | |||
| { | |||
| public class LinkModel | |||
| { | |||
| public string Link { get; set; } | |||
| public MessageModel message { get; set; } | |||
| public bool? Share { get; set; } | |||
| public TimeSpan? TimeLeft { get; set; } | |||
| public bool IsValid { get; set; } | |||
| } | |||
| } | |||
| @@ -1,19 +0,0 @@ | |||
| using MVCTemplate.Business.Infrastructure; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| namespace MVCTemplate.Models | |||
| { | |||
| public class MessageModel | |||
| { | |||
| public int Id { get; set; } | |||
| public string Text { get; set; } | |||
| public PeriodOfValidity ChosenPeriod { get; set; } | |||
| // public Dictionary<int, string> AvailablePeriods { get; set; } | |||
| } | |||
| } | |||
| @@ -1,26 +0,0 @@ | |||
| using Microsoft.AspNetCore.Hosting; | |||
| using Microsoft.Extensions.Configuration; | |||
| using Microsoft.Extensions.Hosting; | |||
| using Microsoft.Extensions.Logging; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Threading.Tasks; | |||
| namespace MVCTemplate | |||
| { | |||
| public class Program | |||
| { | |||
| public static void Main(string[] args) | |||
| { | |||
| CreateHostBuilder(args).Build().Run(); | |||
| } | |||
| public static IHostBuilder CreateHostBuilder(string[] args) => | |||
| Host.CreateDefaultBuilder(args) | |||
| .ConfigureWebHostDefaults(webBuilder => | |||
| { | |||
| webBuilder.UseStartup<Startup>(); | |||
| }); | |||
| } | |||
| } | |||
| @@ -1,30 +0,0 @@ | |||
| { | |||
| "iisSettings": { | |||
| "windowsAuthentication": false, | |||
| "anonymousAuthentication": true, | |||
| "iisExpress": { | |||
| "applicationUrl": "http://localhost:24744", | |||
| "sslPort": 44336 | |||
| } | |||
| }, | |||
| "profiles": { | |||
| "IIS Express": { | |||
| "commandName": "IISExpress", | |||
| "launchBrowser": true, | |||
| "environmentVariables": { | |||
| "ASPNETCORE_ENVIRONMENT": "Development", | |||
| "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" | |||
| } | |||
| }, | |||
| "MVCTemplate": { | |||
| "commandName": "Project", | |||
| "dotnetRunMessages": "true", | |||
| "launchBrowser": true, | |||
| "applicationUrl": "https://localhost:5001;http://localhost:5000", | |||
| "environmentVariables": { | |||
| "ASPNETCORE_ENVIRONMENT": "Development", | |||
| "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @@ -1,57 +0,0 @@ | |||
| using Microsoft.Extensions.DependencyInjection; | |||
| using Quartz; | |||
| using Quartz.Spi; | |||
| using System; | |||
| using System.Collections.Concurrent; | |||
| namespace MVCTemplate.Quartz | |||
| { | |||
| public class JobFactory : IJobFactory | |||
| { | |||
| protected readonly IServiceProvider _serviceProvider; | |||
| protected readonly ConcurrentDictionary<IJob, IServiceScope> _scopes = new ConcurrentDictionary<IJob, IServiceScope>(); | |||
| public JobFactory(IServiceProvider serviceProvider) | |||
| { | |||
| _serviceProvider = serviceProvider; | |||
| } | |||
| public IJob NewJob(TriggerFiredBundle bundle, IScheduler scheduler) | |||
| { | |||
| var scope = _serviceProvider.CreateScope(); | |||
| IJob job; | |||
| try | |||
| { | |||
| job = scope.ServiceProvider.GetRequiredService(bundle.JobDetail.JobType) as IJob; | |||
| } | |||
| catch | |||
| { | |||
| // Failed to create the job -> ensure scope gets disposed | |||
| scope.Dispose(); | |||
| throw; | |||
| } | |||
| // Add scope to dictionary so we can dispose it once the job finishes | |||
| if (!_scopes.TryAdd(job, scope)) | |||
| { | |||
| // Failed to track DI scope -> ensure scope gets disposed | |||
| scope.Dispose(); | |||
| throw new Exception("Failed to track DI scope"); | |||
| } | |||
| return job; | |||
| } | |||
| public void ReturnJob(IJob job) | |||
| { | |||
| if (_scopes.TryRemove(job, out var scope)) | |||
| { | |||
| // The Dispose() method ends the scope lifetime. | |||
| // Once Dispose is called, any scoped services that have been resolved from ServiceProvider will be disposed. | |||
| scope.Dispose(); | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @@ -1,20 +0,0 @@ | |||
| using System; | |||
| namespace MVCTemplate.Quartz | |||
| { | |||
| public class JobMetadata | |||
| { | |||
| public Guid JobId { get; set; } | |||
| public Type JobType { get; } | |||
| public string JobName { get; } | |||
| public string CronExpression { get; } | |||
| public JobMetadata(Type jobType, | |||
| string cronExpression) | |||
| { | |||
| //JobId = Id; | |||
| JobType = jobType; | |||
| //JobName = jobName; | |||
| CronExpression = cronExpression; | |||
| } | |||
| } | |||
| } | |||
| @@ -1,54 +0,0 @@ | |||
| using Microsoft.Extensions.Hosting; | |||
| using Quartz; | |||
| using Quartz.Spi; | |||
| using System.Threading; | |||
| using System.Threading.Tasks; | |||
| namespace MVCTemplate.Quartz | |||
| { | |||
| public class JobsService: IHostedService | |||
| { | |||
| private readonly ISchedulerFactory schedulerFactory; | |||
| private readonly IJobFactory jobFactory; | |||
| private readonly JobMetadata jobMetadata; | |||
| public JobsService(ISchedulerFactory | |||
| schedulerFactory, | |||
| JobMetadata jobMetadata, | |||
| IJobFactory jobFactory) | |||
| { | |||
| this.schedulerFactory = schedulerFactory; | |||
| this.jobMetadata = jobMetadata; | |||
| this.jobFactory = jobFactory; | |||
| } | |||
| public IScheduler Scheduler { get; set; } | |||
| public async Task StartAsync(CancellationToken cancellationToken) | |||
| { | |||
| Scheduler = await schedulerFactory.GetScheduler(); | |||
| Scheduler.JobFactory = jobFactory; | |||
| var job = CreateJob(jobMetadata); | |||
| var trigger = CreateTrigger(jobMetadata); | |||
| await Scheduler.ScheduleJob(job, trigger, cancellationToken); | |||
| await Scheduler.Start(cancellationToken); | |||
| } | |||
| public async Task StopAsync(CancellationToken cancellationToken) | |||
| { | |||
| await Scheduler?.Shutdown(cancellationToken); | |||
| } | |||
| private ITrigger CreateTrigger(JobMetadata jobMetadata) | |||
| { | |||
| return TriggerBuilder.Create() | |||
| .WithIdentity(jobMetadata.JobId.ToString()) | |||
| .WithCronSchedule(jobMetadata.CronExpression) | |||
| .WithDescription($"{jobMetadata.JobName}") | |||
| .Build(); | |||
| } | |||
| private IJobDetail CreateJob(JobMetadata jobMetadata) | |||
| { | |||
| return JobBuilder | |||
| .Create(jobMetadata.JobType) | |||
| .WithIdentity(jobMetadata.JobId.ToString()) | |||
| .WithDescription($"{jobMetadata.JobName}") | |||
| .Build(); | |||
| } | |||
| } | |||
| } | |||
| @@ -1,28 +0,0 @@ | |||
| using MVCTemplate.Business.Interfaces; | |||
| using Quartz; | |||
| using System; | |||
| using System.Threading.Tasks; | |||
| namespace MVCTemplate.Quartz | |||
| { | |||
| public class MessageDeletionJob:IJob | |||
| { | |||
| private readonly IMessageService _messageService; | |||
| public MessageDeletionJob(IMessageService messageService) | |||
| { | |||
| _messageService = messageService; | |||
| } | |||
| public async Task Execute(IJobExecutionContext context) | |||
| { | |||
| try | |||
| { | |||
| await _messageService.DeleteExpiredMessages(); | |||
| } | |||
| catch (Exception ex) | |||
| { | |||
| /*Log*/ | |||
| } | |||
| return; | |||
| } | |||
| } | |||
| } | |||
| @@ -1,106 +0,0 @@ | |||
| using Microsoft.AspNetCore.Builder; | |||
| using Microsoft.AspNetCore.Hosting; | |||
| using Microsoft.AspNetCore.HttpsPolicy; | |||
| using Microsoft.AspNetCore.Identity; | |||
| using Microsoft.Extensions.Configuration; | |||
| using Microsoft.Extensions.DependencyInjection; | |||
| using Microsoft.Extensions.Hosting; | |||
| using MVCTemplate.Business.Infrastructure; | |||
| using MVCTemplate.Business.Infrastructure.Extensions; | |||
| using MVCTemplate.Business.Infrastructure.Settings; | |||
| using MVCTemplate.Business.Interfaces; | |||
| using MVCTemplate.Business.Services; | |||
| using MVCTemplate.Data.DbContexts; | |||
| using MVCTemplate.Infrastructure; | |||
| using MVCTemplate.Infrastructure.Middleware; | |||
| using MVCTemplate.Quartz; | |||
| using Quartz; | |||
| using Quartz.Impl; | |||
| using Quartz.Spi; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Threading.Tasks; | |||
| namespace MVCTemplate | |||
| { | |||
| public class Startup | |||
| { | |||
| public Startup(IConfiguration configuration) | |||
| { | |||
| Configuration = configuration; | |||
| } | |||
| public IConfiguration Configuration { get; } | |||
| // This method gets called by the runtime. Use this method to add services to the container. | |||
| public void ConfigureServices(IServiceCollection services) | |||
| { | |||
| StartupConfiguration.ConfigureStartupConfig<EmailSettings>(services, Configuration); | |||
| services.AddControllersWithViews(); | |||
| services.AddRazorPages(); | |||
| StartupExtensions.ConfigureServices(services); | |||
| services.AddDefaultIdentity<IdentityUser>(options => options.SignIn.RequireConfirmedAccount = false) | |||
| .AddDefaultUI() | |||
| .AddRoles<IdentityRole>() | |||
| .AddEntityFrameworkStores<AppDbContext>(); | |||
| services.AddScoped<IMessageService, MessageService>(); | |||
| services.AddScoped<IModelFactory, ModelFactory>(); | |||
| services.AddAuthentication() | |||
| .AddGoogle(options => | |||
| { | |||
| options.ClientId = Configuration.GetSection("EmailSettings").GetSection("ClientId").Value; | |||
| options.ClientSecret = Configuration.GetSection("EmailSettings").GetSection("ClientSecret").Value; | |||
| }); | |||
| // Add Quartz services | |||
| services.AddSingleton<IJobFactory, JobFactory>(); | |||
| services.AddSingleton<ISchedulerFactory, StdSchedulerFactory>(); | |||
| // Add our jobs | |||
| services.AddScoped<MessageDeletionJob>(); | |||
| services.AddSingleton(new JobMetadata( | |||
| jobType: typeof(MessageDeletionJob), | |||
| cronExpression: "0 0 12 * * ?")); | |||
| services.AddHostedService<JobsService>(); | |||
| } | |||
| // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. | |||
| public void Configure(IApplicationBuilder app, IWebHostEnvironment env) | |||
| { | |||
| if (env.IsDevelopment()) | |||
| { | |||
| app.UseDeveloperExceptionPage(); | |||
| } | |||
| else | |||
| { | |||
| app.UseExceptionHandler("/Home/Error"); | |||
| // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. | |||
| app.UseHsts(); | |||
| } | |||
| app.UseHttpsRedirection(); | |||
| app.UseStaticFiles(); | |||
| app.UseRouting(); | |||
| app.UseAuthentication(); | |||
| app.UseAuthorization(); | |||
| app.UseMiddleware(typeof(ExceptionHandlingMiddleware)); | |||
| app.UseEndpoints(endpoints => | |||
| { | |||
| endpoints.MapControllerRoute( | |||
| name: "default", | |||
| pattern: "{controller=Home}/{action=Index}/{id?}"); | |||
| endpoints.MapRazorPages(); | |||
| }); | |||
| } | |||
| } | |||
| } | |||
| @@ -1,31 +0,0 @@ | |||
| @{ | |||
| Layout = "~/Views/Shared/_Layout.cshtml"; | |||
| } | |||
| @using MVCTemplate.Business.Infrastructure | |||
| @model MessageModel | |||
| <div class="text-center"> | |||
| <form method="post" asp-controller="Home" asp-action="CreateMessage"> | |||
| <input asp-for="Text" /> | |||
| <br> | |||
| <input type="radio" asp-for="ChosenPeriod" value="@PeriodOfValidity.ONE_TIME" /> ONE TIME | |||
| <br> | |||
| <input type="radio" asp-for="ChosenPeriod" value="@PeriodOfValidity.ONE_HOUR" /> ONE HOUR | |||
| <br> | |||
| <input type="radio" asp-for="ChosenPeriod" value="@PeriodOfValidity.ONE_DAY" /> ONE DAY | |||
| <br> | |||
| <input type="radio" asp-for="ChosenPeriod" value="@PeriodOfValidity.ONE_WEEK" /> SEVEN DAYS | |||
| <br> | |||
| <button class = " btn btn-light" type="submit">Send</button> | |||
| </form> | |||
| <br> | |||
| </div> | |||
| @@ -1,111 +0,0 @@ | |||
| @{ | |||
| var controller = ViewContext.RouteData.Values["Controller"]; | |||
| var action = ViewContext.RouteData.Values["Action"]; | |||
| } | |||
| <!DOCTYPE html> | |||
| <html lang="en"> | |||
| <head> | |||
| <meta charset="utf-8" /> | |||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |||
| <title>@ViewData["Title"] - MVCTemplate</title> | |||
| <!-- Google Font: Source Sans Pro --> | |||
| <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback"> | |||
| <!-- Font Awesome --> | |||
| <link rel="stylesheet" href="~/plugins/fontawesome-free/css/all.min.css"> | |||
| <!-- Ionicons --> | |||
| <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css"> | |||
| <!-- Tempusdominus Bootstrap 4 --> | |||
| <link rel="stylesheet" href="~/plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css"> | |||
| <!-- iCheck --> | |||
| <link rel="stylesheet" href="~/plugins/icheck-bootstrap/icheck-bootstrap.min.css"> | |||
| <!-- JQVMap --> | |||
| <link rel="stylesheet" href="~/plugins/jqvmap/jqvmap.min.css"> | |||
| <!-- Theme style --> | |||
| <link rel="stylesheet" href="~/dist/css/adminlte.min.css"> | |||
| <!-- overlayScrollbars --> | |||
| <link rel="stylesheet" href="~/plugins/overlayScrollbars/css/OverlayScrollbars.min.css"> | |||
| <!-- Daterange picker --> | |||
| <link rel="stylesheet" href="~/plugins/daterangepicker/daterangepicker.css"> | |||
| <!-- summernote --> | |||
| <link rel="stylesheet" href="~/plugins/summernote/summernote-bs4.min.css"> | |||
| <link href="~/lib/jquery-confirm/jquery-confirm.min.css" rel="stylesheet" /> | |||
| <link rel="stylesheet" href="~/css/site.css"> | |||
| </head> | |||
| <body class="hold-transition layout-fixed"> | |||
| <noscript><p>Your browser does not support JavaScript. You need it enabled to do testing.</p></noscript> | |||
| <div class="wrapper"> | |||
| <div class="content-wrapper default-layout"> | |||
| <section class="content"> | |||
| <main role="main" class="pb-3"> | |||
| <div class="content-fluid"> | |||
| <div> </div> | |||
| <div class="card"> | |||
| <div class="card-body"> | |||
| @RenderBody() | |||
| </div> | |||
| </div> | |||
| </div> | |||
| </main> | |||
| </section> | |||
| </div> | |||
| <footer class="main-footer ml-0"> | |||
| <strong>Copyright © 2021 <a href="https://dilig.net/">Diligent Software</a>.</strong> | |||
| All rights reserved. | |||
| <div class="float-right d-none d-sm-inline-block"> | |||
| <b>Version</b> 1.0.0-alpha | |||
| </div> | |||
| </footer> | |||
| </div> | |||
| <!-- jQuery --> | |||
| <script src="~/plugins/jquery/jquery.min.js"></script> | |||
| <!-- jQuery UI 1.11.4 --> | |||
| <script src="~/plugins/jquery-ui/jquery-ui.min.js"></script> | |||
| <!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip --> | |||
| <script> | |||
| $.widget.bridge('uibutton', $.ui.button) | |||
| </script> | |||
| <!-- Bootstrap 4 --> | |||
| <script src="~/plugins/bootstrap/js/bootstrap.bundle.min.js"></script> | |||
| <!-- ChartJS --> | |||
| <script src="~/plugins/chart.js/Chart.min.js"></script> | |||
| <!-- Sparkline --> | |||
| <script src="~/plugins/sparklines/sparkline.js"></script> | |||
| <!-- JQVMap --> | |||
| <script src="~/plugins/jqvmap/jquery.vmap.min.js"></script> | |||
| <script src="~/plugins/jqvmap/maps/jquery.vmap.usa.js"></script> | |||
| <!-- jQuery Knob Chart --> | |||
| <script src="~/plugins/jquery-knob/jquery.knob.min.js"></script> | |||
| <!-- daterangepicker --> | |||
| <script src="~/plugins/moment/moment.min.js"></script> | |||
| <script src="~/plugins/daterangepicker/daterangepicker.js"></script> | |||
| <!-- Tempusdominus Bootstrap 4 --> | |||
| <script src="~/plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script> | |||
| <!-- Summernote --> | |||
| <script src="~/plugins/summernote/summernote-bs4.min.js"></script> | |||
| <!-- overlayScrollbars --> | |||
| <script src="~/plugins/overlayScrollbars/js/jquery.overlayScrollbars.min.js"></script> | |||
| <!-- AdminLTE App --> | |||
| <script src="~/dist/js/adminlte.js"></script> | |||
| <!-- JQery Confirm --> | |||
| <script src="~/lib/alertifyjs/alertify.min.js"></script> | |||
| <script src="~/lib/blockUI/jquery.blockUI.js"></script> | |||
| <script src="~/js/site.js" asp-append-version="true"></script> | |||
| @await RenderSectionAsync("Scripts", required: false) | |||
| </body> | |||
| </html> | |||
| @@ -1,264 +0,0 @@ | |||
| @*@{ | |||
| var controller = ViewContext.RouteData.Values["Controller"]; | |||
| var action = ViewContext.RouteData.Values["Action"]; | |||
| } | |||
| <!DOCTYPE html> | |||
| <html lang="en"> | |||
| <head> | |||
| <meta charset="utf-8" /> | |||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |||
| <title>@ViewData["Title"] - MVCTemplate</title> | |||
| <!-- Google Font: Source Sans Pro --> | |||
| <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback"> | |||
| <!-- Font Awesome --> | |||
| <link rel="stylesheet" href="~/plugins/fontawesome-free/css/all.min.css"> | |||
| <link rel="stylesheet" href="~/css/site.css"> | |||
| <!-- Ionicons --> | |||
| <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css"> | |||
| <!-- Tempusdominus Bootstrap 4 --> | |||
| <link rel="stylesheet" href="~/plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css"> | |||
| <!-- iCheck --> | |||
| <link rel="stylesheet" href="~/plugins/icheck-bootstrap/icheck-bootstrap.min.css"> | |||
| <!-- JQVMap --> | |||
| <link rel="stylesheet" href="~/plugins/jqvmap/jqvmap.min.css"> | |||
| <!-- Theme style --> | |||
| <link rel="stylesheet" href="~/dist/css/adminlte.min.css"> | |||
| <!-- overlayScrollbars --> | |||
| <link rel="stylesheet" href="~/plugins/overlayScrollbars/css/OverlayScrollbars.min.css"> | |||
| <!-- Daterange picker --> | |||
| <link rel="stylesheet" href="~/plugins/daterangepicker/daterangepicker.css"> | |||
| <!-- summernote --> | |||
| <link rel="stylesheet" href="~/plugins/summernote/summernote-bs4.min.css"> | |||
| <!-- summernote --> | |||
| <link rel="stylesheet" href="~/plugins/datatables-bs4/css/dataTables.bootstrap4.min.css"> | |||
| <link rel="stylesheet" href="~/plugins/datatables-responsive/css/responsive.bootstrap4.min.css"> | |||
| <link rel="stylesheet" href="~/plugins/datatables-buttons/css/buttons.bootstrap4.min.css"> | |||
| <link rel="stylesheet" href="~/plugins/datatables-rowreorder/css/rowReorder.bootstrap4.min.css"> | |||
| <link rel="stylesheet" href="~/plugins/select2/css/select2.css"> | |||
| <link rel="stylesheet" href="~/plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css"> | |||
| <link href="~/lib/jquery-confirm/jquery-confirm.min.css" rel="stylesheet" /> | |||
| <link rel="stylesheet" href="~/css/site.css"> | |||
| </head> | |||
| <body class="hold-transition sidebar-mini layout-fixed"> | |||
| <div class="wrapper"> | |||
| <header> | |||
| <!-- Navbar --> | |||
| <nav class="main-header navbar navbar-expand navbar-white navbar-light"> | |||
| <!-- Left navbar links --> | |||
| <ul class="navbar-nav"> | |||
| <li class="nav-item"> | |||
| <a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a> | |||
| </li> | |||
| </ul> | |||
| <!-- Right navbar links --> | |||
| <ul class="navbar-nav ml-auto"> | |||
| <!-- User Dropdown Menu --> | |||
| <li class="nav-item dropdown"> | |||
| <a class="nav-link" data-toggle="dropdown" href="#"> | |||
| <i class="far fa-user"></i> @User.FindFirst(System.Security.Claims.ClaimTypes.Email).Value | |||
| </a> | |||
| <div class="dropdown-menu dropdown-menu-right"> | |||
| <a href="#" class="dropdown-item"> | |||
| <i class="fas fa-cog mr-2"></i> Profile | |||
| </a> | |||
| <a href="/Identity/Account/LogOut" class="dropdown-item"> | |||
| <i class="fas fa-sign-out-alt mr-2"></i> Log Out | |||
| </a> | |||
| </div> | |||
| </li> | |||
| </ul> | |||
| </nav> | |||
| <!-- /.navbar --> | |||
| </header> | |||
| <!-- Main Sidebar Container --> | |||
| <aside class="main-sidebar sidebar-dark-purple elevation-4"> | |||
| <!-- Brand Logo --> | |||
| <a href="#" class="brand-link"> | |||
| <img src="~/dist/img/AdminLTELogo.png" alt="AdminLTE Logo" class="brand-image img-circle elevation-3" style="opacity: .8"> | |||
| <span class="brand-text font-weight-light">Screening test</span> | |||
| </a> | |||
| <!-- Sidebar --> | |||
| <div class="sidebar"> | |||
| <!-- SidebarSearch Form --> | |||
| <div class="form-inline"> | |||
| <div class="input-group" data-widget="sidebar-search"> | |||
| <input class="form-control form-control-sidebar" type="search" placeholder="Search" aria-label="Search"> | |||
| <div class="input-group-append"> | |||
| <button class="btn btn-sidebar"> | |||
| <i class="fas fa-search fa-fw"></i> | |||
| </button> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| <!-- Sidebar Menu --> | |||
| <nav class="mt-2"> | |||
| <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false"> | |||
| <!-- Add icons to the links using the .nav-icon class | |||
| with font-awesome or any other icon font library --> | |||
| <li class="nav-item menu-open"> | |||
| <a href="#" class='nav-link @(action.ToString() == "Users" || action.ToString() == "Invites" ? "active" : "")'> | |||
| <i class="nav-icon fas fa-tachometer-alt"></i> | |||
| <p> | |||
| Dashboard | |||
| <i class="right fas fa-angle-left"></i> | |||
| </p> | |||
| </a> | |||
| <ul class="nav nav-treeview"> | |||
| <li class="nav-item"> | |||
| <a href="#" class='nav-link @(action.ToString() == "Statistics" ? "active" : "")'> | |||
| <i class="far fa-circle nav-icon"></i> | |||
| <p>Statistics</p> | |||
| </a> | |||
| </li> | |||
| <li class='nav-item'> | |||
| <a asp-controller="Manage" asp-action="Users" class='nav-link @(action.ToString() == "Users" ? "active" : "")'> | |||
| <i class="far fa-circle nav-icon"></i> | |||
| <p>Users</p> | |||
| </a> | |||
| </li> | |||
| <li class='nav-item'> | |||
| <a asp-controller="Manage" asp-action="Invites" class='nav-link @(action.ToString() == "Invites" ? "active" : "")'> | |||
| <i class="far fa-circle nav-icon"></i> | |||
| <p>Invites</p> | |||
| </a> | |||
| </li> | |||
| </ul> | |||
| </li> | |||
| <li class="nav-item menu-open"> | |||
| <a href="#" class='nav-link @(action.ToString() == "Tests" || action.ToString() == "Questions" ? "active" : "")'> | |||
| <i class='nav-icon fas fa-scroll'></i> | |||
| <p> | |||
| Test Management | |||
| <i class="right fas fa-angle-left"></i> | |||
| </p> | |||
| </a> | |||
| <ul class="nav nav-treeview"> | |||
| <li class="nav-item"> | |||
| <a asp-controller="Manage" asp-action="Tests" class='nav-link @(action.ToString() == "Tests" ? "active" : "")'> | |||
| <i class="far fa-circle nav-icon"></i> | |||
| <p>Tests</p> | |||
| </a> | |||
| </li> | |||
| <li class="nav-item"> | |||
| <a asp-controller="Manage" asp-action="Questions" class='nav-link @(action.ToString() == "Questions" ? "active" : "")'> | |||
| <i class="far fa-circle nav-icon"></i> | |||
| <p>Questions</p> | |||
| </a> | |||
| </li> | |||
| </ul> | |||
| </li> | |||
| <li class="nav-item menu-open"> | |||
| <a href="#" class='nav-link @(action.ToString() == "Categories" ? "active" : "")'> | |||
| <i class="nav-icon fas fa-cog"></i> | |||
| <p> | |||
| Settings | |||
| <i class="right fas fa-angle-left"></i> | |||
| </p> | |||
| </a> | |||
| <ul class="nav nav-treeview"> | |||
| <li class="nav-item"> | |||
| <a asp-controller="Manage" asp-action="Categories" class='nav-link @(action.ToString() == "Categories" ? "active" : "")'> | |||
| <i class="far fa-circle nav-icon"></i> | |||
| <p>Categories</p> | |||
| </a> | |||
| </li> | |||
| </ul> | |||
| </li> | |||
| </ul> | |||
| </nav> | |||
| <!-- /.sidebar-menu --> | |||
| </div> | |||
| <!-- /.sidebar --> | |||
| </aside> | |||
| <div class="content-wrapper"> | |||
| <section class="content"> | |||
| <main role="main" class="pb-3"> | |||
| @RenderBody() | |||
| </main> | |||
| </section> | |||
| </div> | |||
| <footer class="main-footer"> | |||
| <strong>Copyright © 2021 <a href="https://dilig.net/">Diligent Software</a>.</strong> | |||
| All rights reserved. | |||
| <div class="float-right d-none d-sm-inline-block"> | |||
| <b>Version</b> 1.0.0-alpha | |||
| </div> | |||
| </footer> | |||
| </div> | |||
| <!-- jQuery --> | |||
| <script src="~/plugins/jquery/jquery.min.js"></script> | |||
| <!-- jQuery UI 1.11.4 --> | |||
| <script src="~/plugins/jquery-ui/jquery-ui.min.js"></script> | |||
| <!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip --> | |||
| <script> | |||
| $.widget.bridge('uibutton', $.ui.button) | |||
| </script> | |||
| <!-- Bootstrap 4 --> | |||
| <script src="~/plugins/bootstrap/js/bootstrap.bundle.min.js"></script> | |||
| <!-- ChartJS --> | |||
| <script src="~/plugins/chart.js/Chart.min.js"></script> | |||
| <!-- Sparkline --> | |||
| <script src="~/plugins/sparklines/sparkline.js"></script> | |||
| <!-- JQVMap --> | |||
| <script src="~/plugins/jqvmap/jquery.vmap.min.js"></script> | |||
| <script src="~/plugins/jqvmap/maps/jquery.vmap.usa.js"></script> | |||
| <!-- jQuery Knob Chart --> | |||
| <script src="~/plugins/jquery-knob/jquery.knob.min.js"></script> | |||
| <!-- daterangepicker --> | |||
| <script src="~/plugins/moment/moment.min.js"></script> | |||
| <script src="~/plugins/daterangepicker/daterangepicker.js"></script> | |||
| <!-- Tempusdominus Bootstrap 4 --> | |||
| <script src="~/plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script> | |||
| <!-- Summernote --> | |||
| <script src="~/plugins/summernote/summernote-bs4.min.js"></script> | |||
| <!-- overlayScrollbars --> | |||
| <script src="~/plugins/overlayScrollbars/js/jquery.overlayScrollbars.min.js"></script> | |||
| <!-- AdminLTE App --> | |||
| <script src="~/dist/js/adminlte.js"></script> | |||
| <script src="~/plugins/datatables/jquery.dataTables.min.js"></script> | |||
| <script src="~/plugins/datatables-bs4/js/dataTables.bootstrap4.min.js"></script> | |||
| <script src="~/plugins/datatables-responsive/js/dataTables.responsive.min.js"></script> | |||
| <script src="~/plugins/datatables-responsive/js/responsive.bootstrap4.min.js"></script> | |||
| <script src="~/plugins/datatables-buttons/js/dataTables.buttons.min.js"></script> | |||
| <script src="~/plugins/datatables-buttons/js/buttons.bootstrap4.min.js"></script> | |||
| <script src="~/plugins/jszip/jszip.min.js"></script> | |||
| <script src="~/plugins/pdfmake/pdfmake.min.js"></script> | |||
| <script src="~/plugins/pdfmake/vfs_fonts.js"></script> | |||
| <script src="~/plugins/datatables-buttons/js/buttons.html5.min.js"></script> | |||
| <script src="~/plugins/datatables-buttons/js/buttons.print.min.js"></script> | |||
| <script src="~/plugins/datatables-buttons/js/buttons.colVis.min.js"></script> | |||
| <script src="~/plugins/datatables-rowreorder/js/dataTables.rowReorder.min.js"></script> | |||
| <script src="~/plugins/datatables-rowreorder/js/rowReorder.bootstrap4.min.js"></script> | |||
| <script src="~/plugins/select2/js/select2.min.js"></script> | |||
| <!-- JQery Confirm --> | |||
| <script src="~/lib/jquery-confirm/jquery-confirm.min.js"></script> | |||
| <script src="~/lib/alertifyjs/alertify.min.js"></script> | |||
| <script src="~/lib/blockUI/jquery.blockUI.js"></script> | |||
| <script src="~/js/site.js" asp-append-version="true"></script> | |||
| @await RenderSectionAsync("Scripts", required: false) | |||
| </body> | |||
| </html> | |||
| *@ | |||
| @@ -1,3 +0,0 @@ | |||
| @using MVCTemplate | |||
| @using MVCTemplate.Models | |||
| @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers | |||
| @@ -1,26 +0,0 @@ | |||
| { | |||
| "AllowedHosts": "*", | |||
| "ConnectionStrings": { | |||
| "DefaultConnection": "data source=(localdb)\\MSSQLLocalDB; initial catalog=Test;Integrated Security=True" | |||
| }, | |||
| "Logging": { | |||
| "LogLevel": { | |||
| "Default": "Information", | |||
| "Microsoft": "Warning", | |||
| "Microsoft.Hosting.Lifetime": "Information" | |||
| } | |||
| }, | |||
| "EmailSettings": { | |||
| "SmtpServer": "mail.dilig.net", | |||
| "SmtpPort": 465, | |||
| "SmtpUseSSL": true, | |||
| "SmtpUsername": "hr@dilig.net", | |||
| "SmtpPassword": "Dilig@hr#", | |||
| "ClientId": "676494945032-kop4sh94m1ecdeqjclqibp3v1m2bpvd6.apps.googleusercontent.com", | |||
| "ClientSecret": "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", | |||
| "SmtpFrom": "hr@dilig.net", | |||
| "SmtpFromName": "Diligent" | |||
| } | |||
| } | |||
| @@ -1,24 +0,0 @@ | |||
| //------------------------------------------------------------------------------ | |||
| // <auto-generated> | |||
| // This code was generated by a tool. | |||
| // Runtime Version:4.0.30319.42000 | |||
| // | |||
| // Changes to this file may cause incorrect behavior and will be lost if | |||
| // the code is regenerated. | |||
| // </auto-generated> | |||
| //------------------------------------------------------------------------------ | |||
| using System; | |||
| using System.Reflection; | |||
| [assembly: Microsoft.AspNetCore.Identity.UI.UIFrameworkAttribute("Bootstrap4")] | |||
| [assembly: System.Reflection.AssemblyCompanyAttribute("MVCTemplate")] | |||
| [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] | |||
| [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] | |||
| [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] | |||
| [assembly: System.Reflection.AssemblyProductAttribute("MVCTemplate")] | |||
| [assembly: System.Reflection.AssemblyTitleAttribute("MVCTemplate")] | |||
| [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] | |||
| // Generated by the MSBuild WriteCodeFragment class. | |||
| @@ -1,10 +0,0 @@ | |||
| is_global = true | |||
| build_property.TargetFramework = net5.0 | |||
| build_property.TargetPlatformMinVersion = | |||
| build_property.UsingMicrosoftNETSdkWeb = true | |||
| build_property.ProjectTypeGuids = | |||
| build_property.PublishSingleFile = | |||
| build_property.IncludeAllContentForSelfExtract = | |||
| build_property._SupportedPlatformList = Android,iOS,Linux,macOS,Windows | |||
| build_property.RootNamespace = MVCTemplate | |||
| build_property.ProjectDir = C:\Users\julija.stojkovic\source\repos\secure-sharing\MVCTemplate\ | |||
| @@ -1,20 +0,0 @@ | |||
| //------------------------------------------------------------------------------ | |||
| // <auto-generated> | |||
| // This code was generated by a tool. | |||
| // Runtime Version:4.0.30319.42000 | |||
| // | |||
| // Changes to this file may cause incorrect behavior and will be lost if | |||
| // the code is regenerated. | |||
| // </auto-generated> | |||
| //------------------------------------------------------------------------------ | |||
| using System; | |||
| using System.Reflection; | |||
| [assembly: Microsoft.AspNetCore.Mvc.ApplicationParts.RelatedAssemblyAttribute("MVCTemplate.Views")] | |||
| [assembly: Microsoft.AspNetCore.Razor.Hosting.RazorLanguageVersionAttribute("5.0")] | |||
| [assembly: Microsoft.AspNetCore.Razor.Hosting.RazorConfigurationNameAttribute("MVC-3.0")] | |||
| [assembly: Microsoft.AspNetCore.Razor.Hosting.RazorExtensionAssemblyNameAttribute("MVC-3.0", "Microsoft.AspNetCore.Mvc.Razor.Extensions")] | |||
| // Generated by the MSBuild WriteCodeFragment class. | |||
| @@ -1,302 +0,0 @@ | |||
| { | |||
| "format": 1, | |||
| "restore": { | |||
| "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate\\MVCTemplate.csproj": {} | |||
| }, | |||
| "projects": { | |||
| "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate.Business\\MVCTemplate.Business.csproj": { | |||
| "version": "1.0.0", | |||
| "restore": { | |||
| "projectUniqueName": "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate.Business\\MVCTemplate.Business.csproj", | |||
| "projectName": "MVCTemplate.Business", | |||
| "projectPath": "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate.Business\\MVCTemplate.Business.csproj", | |||
| "packagesPath": "C:\\Users\\julija.stojkovic\\.nuget\\packages\\", | |||
| "outputPath": "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate.Business\\obj\\", | |||
| "projectStyle": "PackageReference", | |||
| "configFilePaths": [ | |||
| "C:\\Users\\julija.stojkovic\\AppData\\Roaming\\NuGet\\NuGet.Config", | |||
| "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" | |||
| ], | |||
| "originalTargetFrameworks": [ | |||
| "net5.0" | |||
| ], | |||
| "sources": { | |||
| "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, | |||
| "https://api.nuget.org/v3/index.json": {} | |||
| }, | |||
| "frameworks": { | |||
| "net5.0": { | |||
| "targetAlias": "net5.0", | |||
| "projectReferences": { | |||
| "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate.Data\\MVCTemplate.Data.csproj": { | |||
| "projectPath": "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate.Data\\MVCTemplate.Data.csproj" | |||
| } | |||
| } | |||
| } | |||
| }, | |||
| "warningProperties": { | |||
| "warnAsError": [ | |||
| "NU1605" | |||
| ] | |||
| } | |||
| }, | |||
| "frameworks": { | |||
| "net5.0": { | |||
| "targetAlias": "net5.0", | |||
| "dependencies": { | |||
| "AutoMapper": { | |||
| "target": "Package", | |||
| "version": "[11.0.1, )" | |||
| }, | |||
| "MailKit": { | |||
| "target": "Package", | |||
| "version": "[2.13.0, )" | |||
| }, | |||
| "Microsoft.AspNetCore.Authentication.Google": { | |||
| "target": "Package", | |||
| "version": "[5.0.7, )" | |||
| }, | |||
| "Microsoft.EntityFrameworkCore.SqlServer": { | |||
| "target": "Package", | |||
| "version": "[5.0.7, )" | |||
| }, | |||
| "Microsoft.Extensions.Configuration.Binder": { | |||
| "target": "Package", | |||
| "version": "[5.0.0, )" | |||
| }, | |||
| "Microsoft.Extensions.DependencyInjection.Abstractions": { | |||
| "target": "Package", | |||
| "version": "[5.0.0, )" | |||
| } | |||
| }, | |||
| "imports": [ | |||
| "net461", | |||
| "net462", | |||
| "net47", | |||
| "net471", | |||
| "net472", | |||
| "net48" | |||
| ], | |||
| "assetTargetFallback": true, | |||
| "warn": true, | |||
| "frameworkReferences": { | |||
| "Microsoft.NETCore.App": { | |||
| "privateAssets": "all" | |||
| } | |||
| }, | |||
| "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.400\\RuntimeIdentifierGraph.json" | |||
| } | |||
| } | |||
| }, | |||
| "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate.Data\\MVCTemplate.Data.csproj": { | |||
| "version": "1.0.0", | |||
| "restore": { | |||
| "projectUniqueName": "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate.Data\\MVCTemplate.Data.csproj", | |||
| "projectName": "MVCTemplate.Data", | |||
| "projectPath": "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate.Data\\MVCTemplate.Data.csproj", | |||
| "packagesPath": "C:\\Users\\julija.stojkovic\\.nuget\\packages\\", | |||
| "outputPath": "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate.Data\\obj\\", | |||
| "projectStyle": "PackageReference", | |||
| "configFilePaths": [ | |||
| "C:\\Users\\julija.stojkovic\\AppData\\Roaming\\NuGet\\NuGet.Config", | |||
| "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" | |||
| ], | |||
| "originalTargetFrameworks": [ | |||
| "net5.0" | |||
| ], | |||
| "sources": { | |||
| "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, | |||
| "https://api.nuget.org/v3/index.json": {} | |||
| }, | |||
| "frameworks": { | |||
| "net5.0": { | |||
| "targetAlias": "net5.0", | |||
| "projectReferences": {} | |||
| } | |||
| }, | |||
| "warningProperties": { | |||
| "warnAsError": [ | |||
| "NU1605" | |||
| ] | |||
| } | |||
| }, | |||
| "frameworks": { | |||
| "net5.0": { | |||
| "targetAlias": "net5.0", | |||
| "dependencies": { | |||
| "AutoMapper": { | |||
| "target": "Package", | |||
| "version": "[11.0.1, )" | |||
| }, | |||
| "Microsoft.AspNetCore.Authentication.Google": { | |||
| "target": "Package", | |||
| "version": "[5.0.7, )" | |||
| }, | |||
| "Microsoft.AspNetCore.Identity.EntityFrameworkCore": { | |||
| "target": "Package", | |||
| "version": "[5.0.4, )" | |||
| }, | |||
| "Microsoft.EntityFrameworkCore": { | |||
| "target": "Package", | |||
| "version": "[5.0.7, )" | |||
| }, | |||
| "Microsoft.EntityFrameworkCore.SqlServer": { | |||
| "target": "Package", | |||
| "version": "[5.0.7, )" | |||
| }, | |||
| "Microsoft.EntityFrameworkCore.Tools": { | |||
| "include": "Runtime, Build, Native, ContentFiles, Analyzers, BuildTransitive", | |||
| "suppressParent": "All", | |||
| "target": "Package", | |||
| "version": "[5.0.4, )" | |||
| }, | |||
| "Microsoft.Extensions.Configuration": { | |||
| "target": "Package", | |||
| "version": "[5.0.0, )" | |||
| }, | |||
| "Microsoft.Extensions.Configuration.Json": { | |||
| "target": "Package", | |||
| "version": "[5.0.0, )" | |||
| } | |||
| }, | |||
| "imports": [ | |||
| "net461", | |||
| "net462", | |||
| "net47", | |||
| "net471", | |||
| "net472", | |||
| "net48" | |||
| ], | |||
| "assetTargetFallback": true, | |||
| "warn": true, | |||
| "frameworkReferences": { | |||
| "Microsoft.NETCore.App": { | |||
| "privateAssets": "all" | |||
| } | |||
| }, | |||
| "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.400\\RuntimeIdentifierGraph.json" | |||
| } | |||
| } | |||
| }, | |||
| "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate\\MVCTemplate.csproj": { | |||
| "version": "1.0.0", | |||
| "restore": { | |||
| "projectUniqueName": "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate\\MVCTemplate.csproj", | |||
| "projectName": "MVCTemplate", | |||
| "projectPath": "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate\\MVCTemplate.csproj", | |||
| "packagesPath": "C:\\Users\\julija.stojkovic\\.nuget\\packages\\", | |||
| "outputPath": "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate\\obj\\", | |||
| "projectStyle": "PackageReference", | |||
| "configFilePaths": [ | |||
| "C:\\Users\\julija.stojkovic\\AppData\\Roaming\\NuGet\\NuGet.Config", | |||
| "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" | |||
| ], | |||
| "originalTargetFrameworks": [ | |||
| "net5.0" | |||
| ], | |||
| "sources": { | |||
| "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, | |||
| "https://api.nuget.org/v3/index.json": {} | |||
| }, | |||
| "frameworks": { | |||
| "net5.0": { | |||
| "targetAlias": "net5.0", | |||
| "projectReferences": { | |||
| "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate.Business\\MVCTemplate.Business.csproj": { | |||
| "projectPath": "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate.Business\\MVCTemplate.Business.csproj" | |||
| }, | |||
| "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate.Data\\MVCTemplate.Data.csproj": { | |||
| "projectPath": "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate.Data\\MVCTemplate.Data.csproj" | |||
| } | |||
| } | |||
| } | |||
| }, | |||
| "warningProperties": { | |||
| "warnAsError": [ | |||
| "NU1605" | |||
| ] | |||
| } | |||
| }, | |||
| "frameworks": { | |||
| "net5.0": { | |||
| "targetAlias": "net5.0", | |||
| "dependencies": { | |||
| "AutoMapper": { | |||
| "target": "Package", | |||
| "version": "[11.0.1, )" | |||
| }, | |||
| "Microsoft.AspNet.Identity.Core": { | |||
| "target": "Package", | |||
| "version": "[2.2.3, )" | |||
| }, | |||
| "Microsoft.AspNetCore.Authentication.Google": { | |||
| "target": "Package", | |||
| "version": "[5.0.7, )" | |||
| }, | |||
| "Microsoft.AspNetCore.Identity.EntityFrameworkCore": { | |||
| "target": "Package", | |||
| "version": "[5.0.6, )" | |||
| }, | |||
| "Microsoft.AspNetCore.Identity.UI": { | |||
| "target": "Package", | |||
| "version": "[5.0.6, )" | |||
| }, | |||
| "Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation": { | |||
| "target": "Package", | |||
| "version": "[5.0.7, )" | |||
| }, | |||
| "Microsoft.EntityFrameworkCore.SqlServer": { | |||
| "target": "Package", | |||
| "version": "[5.0.7, )" | |||
| }, | |||
| "Microsoft.EntityFrameworkCore.Tools": { | |||
| "include": "Runtime, Build, Native, ContentFiles, Analyzers, BuildTransitive", | |||
| "suppressParent": "All", | |||
| "target": "Package", | |||
| "version": "[5.0.6, )" | |||
| }, | |||
| "Microsoft.VisualStudio.Web.CodeGeneration.Design": { | |||
| "target": "Package", | |||
| "version": "[5.0.2, )" | |||
| }, | |||
| "Newtonsoft.Json": { | |||
| "target": "Package", | |||
| "version": "[13.0.1, )" | |||
| }, | |||
| "Quartz": { | |||
| "target": "Package", | |||
| "version": "[3.4.0, )" | |||
| }, | |||
| "Serilog": { | |||
| "target": "Package", | |||
| "version": "[2.10.0, )" | |||
| }, | |||
| "Serilog.AspNetCore": { | |||
| "target": "Package", | |||
| "version": "[4.1.0, )" | |||
| } | |||
| }, | |||
| "imports": [ | |||
| "net461", | |||
| "net462", | |||
| "net47", | |||
| "net471", | |||
| "net472", | |||
| "net48" | |||
| ], | |||
| "assetTargetFallback": true, | |||
| "warn": true, | |||
| "frameworkReferences": { | |||
| "Microsoft.AspNetCore.App": { | |||
| "privateAssets": "none" | |||
| }, | |||
| "Microsoft.NETCore.App": { | |||
| "privateAssets": "all" | |||
| } | |||
| }, | |||
| "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.400\\RuntimeIdentifierGraph.json" | |||
| } | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @@ -1,26 +0,0 @@ | |||
| <?xml version="1.0" encoding="utf-8" standalone="no"?> | |||
| <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
| <PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' "> | |||
| <RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess> | |||
| <RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool> | |||
| <ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile> | |||
| <NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot> | |||
| <NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\julija.stojkovic\.nuget\packages\</NuGetPackageFolders> | |||
| <NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle> | |||
| <NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.11.0</NuGetToolVersion> | |||
| </PropertyGroup> | |||
| <ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' "> | |||
| <SourceRoot Include="C:\Users\julija.stojkovic\.nuget\packages\" /> | |||
| </ItemGroup> | |||
| <PropertyGroup> | |||
| <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects> | |||
| </PropertyGroup> | |||
| <ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' "> | |||
| <Import Project="$(NuGetPackageRoot)microsoft.entityframeworkcore.design\5.0.6\build\netcoreapp3.0\Microsoft.EntityFrameworkCore.Design.props" Condition="Exists('$(NuGetPackageRoot)microsoft.entityframeworkcore.design\5.0.6\build\netcoreapp3.0\Microsoft.EntityFrameworkCore.Design.props')" /> | |||
| <Import Project="$(NuGetPackageRoot)microsoft.aspnetcore.identity.ui\5.0.6\buildTransitive\Microsoft.AspNetCore.Identity.UI.props" Condition="Exists('$(NuGetPackageRoot)microsoft.aspnetcore.identity.ui\5.0.6\buildTransitive\Microsoft.AspNetCore.Identity.UI.props')" /> | |||
| </ImportGroup> | |||
| <PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' "> | |||
| <PkgMicrosoft_EntityFrameworkCore_Tools Condition=" '$(PkgMicrosoft_EntityFrameworkCore_Tools)' == '' ">C:\Users\julija.stojkovic\.nuget\packages\microsoft.entityframeworkcore.tools\5.0.6</PkgMicrosoft_EntityFrameworkCore_Tools> | |||
| <PkgMicrosoft_CodeAnalysis_Analyzers Condition=" '$(PkgMicrosoft_CodeAnalysis_Analyzers)' == '' ">C:\Users\julija.stojkovic\.nuget\packages\microsoft.codeanalysis.analyzers\3.0.0</PkgMicrosoft_CodeAnalysis_Analyzers> | |||
| </PropertyGroup> | |||
| </Project> | |||
| @@ -1,10 +0,0 @@ | |||
| <?xml version="1.0" encoding="utf-8" standalone="no"?> | |||
| <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
| <PropertyGroup> | |||
| <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects> | |||
| </PropertyGroup> | |||
| <ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' "> | |||
| <Import Project="$(NuGetPackageRoot)microsoft.aspnetcore.mvc.razor.runtimecompilation\5.0.7\buildTransitive\net5.0\Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.aspnetcore.mvc.razor.runtimecompilation\5.0.7\buildTransitive\net5.0\Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.targets')" /> | |||
| <Import Project="$(NuGetPackageRoot)microsoft.aspnetcore.identity.ui\5.0.6\buildTransitive\Microsoft.AspnetCore.Identity.UI.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.aspnetcore.identity.ui\5.0.6\buildTransitive\Microsoft.AspnetCore.Identity.UI.targets')" /> | |||
| </ImportGroup> | |||
| </Project> | |||
| @@ -1,184 +0,0 @@ | |||
| { | |||
| "version": 2, | |||
| "dgSpecHash": "WCotpYc1yxk2IcjEvak8F57XkhzHDcri3MJBx2myL3WpB62XX1GqgiOBsrxH2X09UOn1j2o0x6g4iS0BfQd6tQ==", | |||
| "success": true, | |||
| "projectFilePath": "C:\\Users\\julija.stojkovic\\source\\repos\\secure-sharing\\MVCTemplate\\MVCTemplate.csproj", | |||
| "expectedPackageFiles": [ | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\automapper\\11.0.1\\automapper.11.0.1.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\humanizer.core\\2.8.26\\humanizer.core.2.8.26.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\mailkit\\2.13.0\\mailkit.2.13.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.aspnet.identity.core\\2.2.3\\microsoft.aspnet.identity.core.2.2.3.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.aspnetcore.authentication.google\\5.0.7\\microsoft.aspnetcore.authentication.google.5.0.7.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.aspnetcore.cryptography.internal\\5.0.6\\microsoft.aspnetcore.cryptography.internal.5.0.6.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.aspnetcore.cryptography.keyderivation\\5.0.6\\microsoft.aspnetcore.cryptography.keyderivation.5.0.6.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.aspnetcore.html.abstractions\\2.2.0\\microsoft.aspnetcore.html.abstractions.2.2.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.aspnetcore.identity.entityframeworkcore\\5.0.6\\microsoft.aspnetcore.identity.entityframeworkcore.5.0.6.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.aspnetcore.identity.ui\\5.0.6\\microsoft.aspnetcore.identity.ui.5.0.6.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.aspnetcore.mvc.razor.extensions\\5.0.7\\microsoft.aspnetcore.mvc.razor.extensions.5.0.7.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.aspnetcore.mvc.razor.runtimecompilation\\5.0.7\\microsoft.aspnetcore.mvc.razor.runtimecompilation.5.0.7.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.aspnetcore.razor\\2.2.0\\microsoft.aspnetcore.razor.2.2.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.aspnetcore.razor.language\\5.0.7\\microsoft.aspnetcore.razor.language.5.0.7.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.aspnetcore.razor.runtime\\2.2.0\\microsoft.aspnetcore.razor.runtime.2.2.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.bcl.asyncinterfaces\\1.1.1\\microsoft.bcl.asyncinterfaces.1.1.1.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.codeanalysis.analyzers\\3.0.0\\microsoft.codeanalysis.analyzers.3.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.codeanalysis.common\\3.8.0\\microsoft.codeanalysis.common.3.8.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.codeanalysis.csharp\\3.8.0\\microsoft.codeanalysis.csharp.3.8.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.codeanalysis.csharp.workspaces\\3.8.0\\microsoft.codeanalysis.csharp.workspaces.3.8.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.codeanalysis.razor\\5.0.7\\microsoft.codeanalysis.razor.5.0.7.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.codeanalysis.workspaces.common\\3.8.0\\microsoft.codeanalysis.workspaces.common.3.8.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.csharp\\4.7.0\\microsoft.csharp.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.data.sqlclient\\2.0.1\\microsoft.data.sqlclient.2.0.1.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.data.sqlclient.sni.runtime\\2.0.1\\microsoft.data.sqlclient.sni.runtime.2.0.1.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.entityframeworkcore\\5.0.7\\microsoft.entityframeworkcore.5.0.7.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.entityframeworkcore.abstractions\\5.0.7\\microsoft.entityframeworkcore.abstractions.5.0.7.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.entityframeworkcore.analyzers\\5.0.7\\microsoft.entityframeworkcore.analyzers.5.0.7.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.entityframeworkcore.design\\5.0.6\\microsoft.entityframeworkcore.design.5.0.6.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.entityframeworkcore.relational\\5.0.7\\microsoft.entityframeworkcore.relational.5.0.7.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.entityframeworkcore.sqlserver\\5.0.7\\microsoft.entityframeworkcore.sqlserver.5.0.7.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.entityframeworkcore.tools\\5.0.6\\microsoft.entityframeworkcore.tools.5.0.6.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.caching.abstractions\\5.0.0\\microsoft.extensions.caching.abstractions.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.caching.memory\\5.0.0\\microsoft.extensions.caching.memory.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.configuration\\5.0.0\\microsoft.extensions.configuration.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.configuration.abstractions\\5.0.0\\microsoft.extensions.configuration.abstractions.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.configuration.binder\\5.0.0\\microsoft.extensions.configuration.binder.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.configuration.fileextensions\\5.0.0\\microsoft.extensions.configuration.fileextensions.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.configuration.json\\5.0.0\\microsoft.extensions.configuration.json.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.dependencyinjection\\5.0.1\\microsoft.extensions.dependencyinjection.5.0.1.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.dependencyinjection.abstractions\\5.0.0\\microsoft.extensions.dependencyinjection.abstractions.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.dependencymodel\\5.0.0\\microsoft.extensions.dependencymodel.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.fileproviders.abstractions\\5.0.0\\microsoft.extensions.fileproviders.abstractions.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.fileproviders.embedded\\5.0.6\\microsoft.extensions.fileproviders.embedded.5.0.6.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.fileproviders.physical\\5.0.0\\microsoft.extensions.fileproviders.physical.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.filesystemglobbing\\5.0.0\\microsoft.extensions.filesystemglobbing.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.hosting.abstractions\\3.1.8\\microsoft.extensions.hosting.abstractions.3.1.8.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.identity.core\\5.0.6\\microsoft.extensions.identity.core.5.0.6.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.identity.stores\\5.0.6\\microsoft.extensions.identity.stores.5.0.6.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.logging\\5.0.0\\microsoft.extensions.logging.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.logging.abstractions\\5.0.0\\microsoft.extensions.logging.abstractions.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.options\\5.0.0\\microsoft.extensions.options.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.options.configurationextensions\\2.0.0\\microsoft.extensions.options.configurationextensions.2.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.extensions.primitives\\5.0.0\\microsoft.extensions.primitives.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.identity.client\\4.14.0\\microsoft.identity.client.4.14.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.identitymodel.jsonwebtokens\\5.6.0\\microsoft.identitymodel.jsonwebtokens.5.6.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.identitymodel.logging\\5.6.0\\microsoft.identitymodel.logging.5.6.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.identitymodel.protocols\\5.6.0\\microsoft.identitymodel.protocols.5.6.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.identitymodel.protocols.openidconnect\\5.6.0\\microsoft.identitymodel.protocols.openidconnect.5.6.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.identitymodel.tokens\\5.6.0\\microsoft.identitymodel.tokens.5.6.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.netcore.platforms\\3.1.0\\microsoft.netcore.platforms.3.1.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.netcore.targets\\1.1.3\\microsoft.netcore.targets.1.1.3.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.visualstudio.web.codegeneration\\5.0.2\\microsoft.visualstudio.web.codegeneration.5.0.2.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.visualstudio.web.codegeneration.contracts\\5.0.2\\microsoft.visualstudio.web.codegeneration.contracts.5.0.2.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.visualstudio.web.codegeneration.core\\5.0.2\\microsoft.visualstudio.web.codegeneration.core.5.0.2.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.visualstudio.web.codegeneration.design\\5.0.2\\microsoft.visualstudio.web.codegeneration.design.5.0.2.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.visualstudio.web.codegeneration.entityframeworkcore\\5.0.2\\microsoft.visualstudio.web.codegeneration.entityframeworkcore.5.0.2.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.visualstudio.web.codegeneration.templating\\5.0.2\\microsoft.visualstudio.web.codegeneration.templating.5.0.2.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.visualstudio.web.codegeneration.utils\\5.0.2\\microsoft.visualstudio.web.codegeneration.utils.5.0.2.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.visualstudio.web.codegenerators.mvc\\5.0.2\\microsoft.visualstudio.web.codegenerators.mvc.5.0.2.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.win32.registry\\4.7.0\\microsoft.win32.registry.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\microsoft.win32.systemevents\\4.7.0\\microsoft.win32.systemevents.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\mimekit\\2.13.0\\mimekit.2.13.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\newtonsoft.json\\13.0.1\\newtonsoft.json.13.0.1.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\portable.bouncycastle\\1.8.10\\portable.bouncycastle.1.8.10.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\quartz\\3.4.0\\quartz.3.4.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\runtime.native.system\\4.3.0\\runtime.native.system.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\serilog\\2.10.0\\serilog.2.10.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\serilog.aspnetcore\\4.1.0\\serilog.aspnetcore.4.1.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\serilog.extensions.hosting\\4.1.2\\serilog.extensions.hosting.4.1.2.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\serilog.extensions.logging\\3.0.1\\serilog.extensions.logging.3.0.1.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\serilog.formatting.compact\\1.1.0\\serilog.formatting.compact.1.1.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\serilog.settings.configuration\\3.1.0\\serilog.settings.configuration.3.1.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\serilog.sinks.console\\3.1.1\\serilog.sinks.console.3.1.1.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\serilog.sinks.debug\\2.0.0\\serilog.sinks.debug.2.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\serilog.sinks.file\\4.1.0\\serilog.sinks.file.4.1.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.buffers\\4.5.1\\system.buffers.4.5.1.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.collections\\4.3.0\\system.collections.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.collections.concurrent\\4.3.0\\system.collections.concurrent.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.collections.immutable\\5.0.0\\system.collections.immutable.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.collections.nongeneric\\4.3.0\\system.collections.nongeneric.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.collections.specialized\\4.3.0\\system.collections.specialized.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.componentmodel\\4.3.0\\system.componentmodel.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.componentmodel.annotations\\5.0.0\\system.componentmodel.annotations.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.componentmodel.primitives\\4.3.0\\system.componentmodel.primitives.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.componentmodel.typeconverter\\4.3.0\\system.componentmodel.typeconverter.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.composition\\1.0.31\\system.composition.1.0.31.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.composition.attributedmodel\\1.0.31\\system.composition.attributedmodel.1.0.31.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.composition.convention\\1.0.31\\system.composition.convention.1.0.31.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.composition.hosting\\1.0.31\\system.composition.hosting.1.0.31.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.composition.runtime\\1.0.31\\system.composition.runtime.1.0.31.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.composition.typedparts\\1.0.31\\system.composition.typedparts.1.0.31.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.configuration.configurationmanager\\4.7.0\\system.configuration.configurationmanager.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.console\\4.3.0\\system.console.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.diagnostics.debug\\4.3.0\\system.diagnostics.debug.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.diagnostics.diagnosticsource\\5.0.1\\system.diagnostics.diagnosticsource.5.0.1.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.diagnostics.tools\\4.3.0\\system.diagnostics.tools.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.diagnostics.tracing\\4.3.0\\system.diagnostics.tracing.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.drawing.common\\4.7.0\\system.drawing.common.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.globalization\\4.3.0\\system.globalization.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.globalization.extensions\\4.3.0\\system.globalization.extensions.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.identitymodel.tokens.jwt\\5.6.0\\system.identitymodel.tokens.jwt.5.6.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.io\\4.3.0\\system.io.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.io.filesystem\\4.3.0\\system.io.filesystem.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.io.filesystem.primitives\\4.3.0\\system.io.filesystem.primitives.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.linq\\4.3.0\\system.linq.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.linq.expressions\\4.3.0\\system.linq.expressions.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.memory\\4.5.4\\system.memory.4.5.4.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.net.nameresolution\\4.3.0\\system.net.nameresolution.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.net.primitives\\4.3.0\\system.net.primitives.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.objectmodel\\4.3.0\\system.objectmodel.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.private.datacontractserialization\\4.3.0\\system.private.datacontractserialization.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.private.uri\\4.3.2\\system.private.uri.4.3.2.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.reflection\\4.3.0\\system.reflection.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.reflection.emit\\4.3.0\\system.reflection.emit.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.reflection.emit.ilgeneration\\4.3.0\\system.reflection.emit.ilgeneration.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.reflection.emit.lightweight\\4.3.0\\system.reflection.emit.lightweight.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.reflection.extensions\\4.3.0\\system.reflection.extensions.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.reflection.metadata\\5.0.0\\system.reflection.metadata.5.0.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.reflection.primitives\\4.3.0\\system.reflection.primitives.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.reflection.typeextensions\\4.4.0\\system.reflection.typeextensions.4.4.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.resources.resourcemanager\\4.3.0\\system.resources.resourcemanager.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.runtime\\4.3.0\\system.runtime.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.runtime.caching\\4.7.0\\system.runtime.caching.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.runtime.compilerservices.unsafe\\4.7.1\\system.runtime.compilerservices.unsafe.4.7.1.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.runtime.extensions\\4.3.0\\system.runtime.extensions.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.runtime.handles\\4.3.0\\system.runtime.handles.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.runtime.interopservices\\4.3.0\\system.runtime.interopservices.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.runtime.interopservices.runtimeinformation\\4.3.0\\system.runtime.interopservices.runtimeinformation.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.runtime.serialization.formatters\\4.3.0\\system.runtime.serialization.formatters.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.runtime.serialization.json\\4.3.0\\system.runtime.serialization.json.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.runtime.serialization.primitives\\4.3.0\\system.runtime.serialization.primitives.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.security.accesscontrol\\4.7.0\\system.security.accesscontrol.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.security.cryptography.cng\\4.7.0\\system.security.cryptography.cng.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.security.cryptography.pkcs\\4.7.0\\system.security.cryptography.pkcs.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.security.cryptography.primitives\\4.3.0\\system.security.cryptography.primitives.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.security.cryptography.protecteddata\\4.7.0\\system.security.cryptography.protecteddata.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.security.permissions\\4.7.0\\system.security.permissions.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.security.principal.windows\\4.7.0\\system.security.principal.windows.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.security.securestring\\4.3.0\\system.security.securestring.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.text.encoding\\4.3.0\\system.text.encoding.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.text.encoding.codepages\\4.7.0\\system.text.encoding.codepages.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.text.encoding.extensions\\4.3.0\\system.text.encoding.extensions.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.text.encodings.web\\4.5.0\\system.text.encodings.web.4.5.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.text.regularexpressions\\4.3.0\\system.text.regularexpressions.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.threading\\4.3.0\\system.threading.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.threading.tasks\\4.3.0\\system.threading.tasks.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.threading.tasks.extensions\\4.5.4\\system.threading.tasks.extensions.4.5.4.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.threading.timer\\4.0.1\\system.threading.timer.4.0.1.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.windows.extensions\\4.7.0\\system.windows.extensions.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.xml.readerwriter\\4.3.0\\system.xml.readerwriter.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.xml.xdocument\\4.3.0\\system.xml.xdocument.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.xml.xmldocument\\4.3.0\\system.xml.xmldocument.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\julija.stojkovic\\.nuget\\packages\\system.xml.xmlserializer\\4.3.0\\system.xml.xmlserializer.4.3.0.nupkg.sha512" | |||
| ], | |||
| "logs": [ | |||
| { | |||
| "code": "NU1701", | |||
| "level": "Warning", | |||
| "warningLevel": 1, | |||
| "message": "Package 'Microsoft.AspNet.Identity.Core 2.2.3' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework 'net5.0'. This package may not be fully compatible with your project.", | |||
| "libraryId": "Microsoft.AspNet.Identity.Core", | |||
| "targetGraphs": [ | |||
| "net5.0" | |||
| ] | |||
| } | |||
| ] | |||
| } | |||
| @@ -0,0 +1,13 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| namespace SecureSharing.Business.Dtos | |||
| { | |||
| public class BaseDto | |||
| { | |||
| public int Id { get; set; } | |||
| } | |||
| } | |||
| @@ -0,0 +1,17 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| namespace SecureSharing.Business.Dtos | |||
| { | |||
| public class MessageDto:BaseDto | |||
| { | |||
| public string Text { get; set; } | |||
| public bool IsValid { get; set; } = true; | |||
| public DateTime? ExpiryDate { get; set; } | |||
| } | |||
| } | |||
| @@ -0,0 +1,33 @@ | |||
| using AutoMapper; | |||
| using Microsoft.Extensions.DependencyInjection; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| namespace SecureSharing.Business.Infrastructure.Extensions | |||
| { | |||
| public class StartupExtensions | |||
| { | |||
| public static void ConfigureServices(IServiceCollection services) | |||
| { | |||
| Data.Extensions.StartupExtensions.ConfigureServices(services); | |||
| // TODO: add all missing services | |||
| var mapperConfiguration = new MapperConfiguration(mc => | |||
| { | |||
| mc.AddProfile(new MapperProfile()); | |||
| }); | |||
| IMapper mapper = mapperConfiguration.CreateMapper(); | |||
| services.AddSingleton(mapper); | |||
| //services.AddLocalization(options => options.ResourcesPath = "Infrastructure/Resources"); | |||
| } | |||
| } | |||
| } | |||
| @@ -0,0 +1,19 @@ | |||
| using AutoMapper; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| using SecureSharing.Data.Data; | |||
| using SecureSharing.Business.Dtos; | |||
| namespace SecureSharing.Business.Infrastructure | |||
| { | |||
| public class MapperProfile : Profile | |||
| { | |||
| public MapperProfile() | |||
| { | |||
| CreateMap<Message, MessageDto>().ReverseMap(); | |||
| } | |||
| } | |||
| } | |||
| @@ -0,0 +1,11 @@ | |||
| | |||
| namespace SecureSharing.Business.Infrastructure | |||
| { | |||
| public enum PeriodOfValidity | |||
| { | |||
| ONE_TIME, | |||
| ONE_HOUR, | |||
| ONE_DAY, | |||
| ONE_WEEK | |||
| } | |||
| } | |||
| @@ -0,0 +1,13 @@ | |||
| namespace SecureSharing.Business.Infrastructure.Settings | |||
| { | |||
| public class EmailSettings | |||
| { | |||
| public string SmtpServer { get; set; } | |||
| public int SmtpPort { get; set; } | |||
| public bool SmtpUseSSL { get; set; } | |||
| public string SmtpUsername { get; set; } | |||
| public string SmtpPassword { get; set; } | |||
| public string SmtpFrom { get; set; } | |||
| public string SmtpFromName { get; set; } | |||
| } | |||
| } | |||
| @@ -0,0 +1,29 @@ | |||
| using Microsoft.Extensions.Configuration; | |||
| using Microsoft.Extensions.DependencyInjection; | |||
| using System; | |||
| namespace SecureSharing.Business.Infrastructure | |||
| { | |||
| public class StartupConfiguration | |||
| { | |||
| public static TConfig ConfigureStartupConfig<TConfig>(IServiceCollection services, IConfiguration configuration) where TConfig : class, new() | |||
| { | |||
| if (services == null) | |||
| throw new ArgumentNullException(nameof(services)); | |||
| if (configuration == null) | |||
| throw new ArgumentNullException(nameof(configuration)); | |||
| //create instance of config | |||
| var config = new TConfig(); | |||
| var classType = typeof(TConfig); | |||
| //bind it to the appropriate section of configuration | |||
| configuration.Bind(classType.Name, config); | |||
| //and register it as a service | |||
| services.AddSingleton(config); | |||
| return config; | |||
| } | |||
| } | |||
| } | |||
| @@ -0,0 +1,23 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| using SecureSharing.Business.Dtos; | |||
| using SecureSharing.Business.Infrastructure; | |||
| namespace SecureSharing.Business.Interfaces | |||
| { | |||
| public interface IMessageService | |||
| { | |||
| public Task<IEnumerable<MessageDto>> GetAll(); | |||
| public Task<int> Create(MessageDto messageDto, PeriodOfValidity chosenPeriod); | |||
| public Task DeleteExpiredMessages(); | |||
| public Task InvalidateMessage(int id); | |||
| public Task Update(MessageDto messageDto); | |||
| public Task<MessageDto> GetById(int messageDto); | |||
| public Task<bool> Delete(int messageDto); | |||
| } | |||
| } | |||
| @@ -0,0 +1,21 @@ | |||
| <Project Sdk="Microsoft.NET.Sdk"> | |||
| <PropertyGroup> | |||
| <TargetFramework>net6.0</TargetFramework> | |||
| <RootNamespace>SecureSharing.Business</RootNamespace> | |||
| </PropertyGroup> | |||
| <ItemGroup> | |||
| <PackageReference Include="AutoMapper" Version="11.0.1" /> | |||
| <PackageReference Include="MailKit" Version="3.4.1" /> | |||
| <PackageReference Include="Microsoft.AspNetCore.Authentication.Google" Version="6.0.9" /> | |||
| <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.9" /> | |||
| <PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="6.0.0" /> | |||
| <PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" /> | |||
| </ItemGroup> | |||
| <ItemGroup> | |||
| <ProjectReference Include="..\SecureSharing.Data\SecureSharing.Data.csproj" /> | |||
| </ItemGroup> | |||
| </Project> | |||
| @@ -0,0 +1,106 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| using AutoMapper; | |||
| using SecureSharing.Business.Dtos; | |||
| using SecureSharing.Business.Interfaces; | |||
| using SecureSharing.Data.Data; | |||
| using SecureSharing.Data.DbContexts; | |||
| using Microsoft.EntityFrameworkCore; | |||
| using SecureSharing.Business.Infrastructure; | |||
| namespace SecureSharing.Business.Services | |||
| { | |||
| public class MessageService:IMessageService | |||
| { | |||
| private readonly AppDbContext _dbContext; | |||
| private readonly IMapper _mapper; | |||
| public MessageService(AppDbContext dbContext, IMapper mapper) | |||
| { | |||
| _dbContext = dbContext; | |||
| _mapper = mapper; | |||
| } | |||
| public async Task<int> Create(MessageDto messageDto, PeriodOfValidity chosenPeriod) | |||
| { | |||
| Message message = _mapper.Map<Message>(messageDto); | |||
| switch (chosenPeriod) | |||
| { | |||
| case (PeriodOfValidity.ONE_TIME): | |||
| message.ExpiryDate = null; | |||
| break; | |||
| case PeriodOfValidity.ONE_DAY: | |||
| message.ExpiryDate = DateTime.UtcNow.AddMinutes(1); | |||
| break; | |||
| case PeriodOfValidity.ONE_HOUR: | |||
| message.ExpiryDate = DateTime.UtcNow.AddHours(1); | |||
| break; | |||
| case PeriodOfValidity.ONE_WEEK: | |||
| message.ExpiryDate = DateTime.UtcNow.AddDays(7); | |||
| break; | |||
| default: | |||
| message.ExpiryDate = null; | |||
| break; | |||
| } | |||
| await _dbContext.Messages.AddAsync(message); | |||
| await _dbContext.SaveChangesAsync(); | |||
| return message.Id; | |||
| } | |||
| public async Task DeleteExpiredMessages() | |||
| { | |||
| var result = await _dbContext.Messages.Where(m =>(m.ExpiryDate != null && m.ExpiryDate <= DateTime.UtcNow)||(!m.IsValid) ).ToListAsync(); | |||
| _dbContext.RemoveRange(result); | |||
| await _dbContext.SaveChangesAsync(); | |||
| } | |||
| public async Task InvalidateMessage(int id) | |||
| { | |||
| var message = await _dbContext.Messages.Where(m => m.Id == id).FirstOrDefaultAsync(); | |||
| message.IsValid = false; | |||
| await _dbContext.SaveChangesAsync(); | |||
| } | |||
| public async Task<bool> Delete(int messageId) | |||
| { | |||
| MessageDto messageDto = await GetById(messageId); | |||
| if (messageDto == null) return false; | |||
| _dbContext.Set<Message>().Remove(_mapper.Map<Message>(messageDto)); | |||
| try | |||
| { | |||
| await _dbContext.SaveChangesAsync(); | |||
| } | |||
| catch (Microsoft.EntityFrameworkCore.DbUpdateException) | |||
| { | |||
| return false; | |||
| } | |||
| return true; | |||
| } | |||
| public async Task<IEnumerable<MessageDto>> GetAll() | |||
| { | |||
| var result = await _dbContext.Messages.AsNoTracking().ToListAsync(); | |||
| var mappedResult = _mapper.Map<IEnumerable<MessageDto>>(result); | |||
| return mappedResult; | |||
| } | |||
| public async Task<MessageDto> GetById(int messageId) | |||
| { | |||
| var result = await _dbContext.Messages.AsNoTracking().FirstOrDefaultAsync(x => x.Id == messageId); | |||
| var mappedResult = _mapper.Map<MessageDto>(result); | |||
| return mappedResult; | |||
| } | |||
| public async Task Update(MessageDto messageDto) | |||
| { | |||
| var a = _dbContext.Messages.Update(_mapper.Map<Message>(messageDto)); | |||
| await _dbContext.SaveChangesAsync(); | |||
| } | |||
| } | |||
| } | |||