Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"ExpandedNodes": [
""
],
"SelectedNode": "\\WebApi.csproj",
"PreviewInSolutionExplorer": false
}
971 changes: 971 additions & 0 deletions .vs/WebApi/config/applicationhost.config

Large diffs are not rendered by default.

Binary file added .vs/WebApi/v16/.suo
Binary file not shown.
971 changes: 971 additions & 0 deletions .vs/aspnet-core-registration-login-api/config/applicationhost.config

Large diffs are not rendered by default.

Binary file not shown.
Binary file added .vs/slnx.sqlite
Binary file not shown.
4 changes: 2 additions & 2 deletions Controllers/UsersController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc;
using AutoMapper;
using System.IdentityModel.Tokens.Jwt;
using WebApi.Helpers;
using Microsoft.Extensions.Options;
using System.Text;
using Microsoft.IdentityModel.Tokens;
using System.Security.Claims;
using Microsoft.AspNetCore.Authorization;
using WebApi.Services;
using WebApi.Dtos;
using WebApi.Entities;
using System.IdentityModel.Tokens.Jwt;
using Microsoft.IdentityModel.Tokens;

namespace WebApi.Controllers
{
Expand Down
1 change: 1 addition & 0 deletions Helpers/DataContext.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

using Microsoft.EntityFrameworkCore;
using WebApi.Entities;

Expand Down
27 changes: 27 additions & 0 deletions Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:60837/",
"sslPort": 44378
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"WebApi": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:5001;http://localhost:5000"
}
}
}
7 changes: 4 additions & 3 deletions Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.EntityFrameworkCore;
using WebApi.Helpers;
using WebApi.Services;
using AutoMapper;
using Microsoft.IdentityModel.Tokens;
using System.Text;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using System;
using Microsoft.EntityFrameworkCore;

namespace WebApi
{
Expand All @@ -29,7 +30,7 @@ public void ConfigureServices(IServiceCollection services)
services.AddCors();
services.AddDbContext<DataContext>(x => x.UseInMemoryDatabase("TestDb"));
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
services.AddAutoMapper();
services.AddAutoMapper(typeof(Startup));

// configure strongly typed settings objects
var appSettingsSection = Configuration.GetSection("AppSettings");
Expand Down
12 changes: 8 additions & 4 deletions WebApi.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AutoMapper" Version="8.0.0" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="AutoMapper" Version="10.0.0" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="8.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Core" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="3.1.9" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.8.0" />
</ItemGroup>
</Project>
6 changes: 6 additions & 0 deletions WebApi.csproj.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ActiveDebugProfile>IIS Express</ActiveDebugProfile>
</PropertyGroup>
</Project>
25 changes: 25 additions & 0 deletions WebApi.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30406.217
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebApi", "WebApi.csproj", "{8456A458-AAEE-4F81-9A65-F379FB41702B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8456A458-AAEE-4F81-9A65-F379FB41702B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8456A458-AAEE-4F81-9A65-F379FB41702B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8456A458-AAEE-4F81-9A65-F379FB41702B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8456A458-AAEE-4F81-9A65-F379FB41702B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {50AB15EA-A529-412F-AD83-9CD5F4B58DFB}
EndGlobalSection
EndGlobal