| @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 | |||
| # Visual Studio Version 16 | |||
| VisualStudioVersion = 16.0.30002.166 | |||
| MinimumVisualStudioVersion = 10.0.40219.1 | |||
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Diligent.API", "src\Diligent.API\Diligent.API.csproj", "{865F036B-DA1A-499C-AFDB-9418F3634FEF}" | |||
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Diligent.WebApi", "src\Diligent.WebApi\Diligent.WebApi.csproj", "{865F036B-DA1A-499C-AFDB-9418F3634FEF}" | |||
| ProjectSection(ProjectDependencies) = postProject | |||
| {EB880A2A-D054-4225-8F4D-3B1F91B75CB8} = {EB880A2A-D054-4225-8F4D-3B1F91B75CB8} | |||
| {199A8692-04A6-4DE6-980D-7DD14DDF59BB} = {199A8692-04A6-4DE6-980D-7DD14DDF59BB} | |||
| @@ -5,7 +5,7 @@ using System.Threading.Tasks; | |||
| using Microsoft.AspNetCore.Http; | |||
| using Microsoft.AspNetCore.Mvc; | |||
| namespace Diligent.API.Controllers | |||
| namespace Diligent.WebApi.Controllers | |||
| { | |||
| [Route("api/[controller]")] | |||
| [ApiController] | |||
| @@ -1,7 +1,7 @@ | |||
| using Microsoft.AspNetCore.Mvc; | |||
| using System.Collections.Generic; | |||
| namespace Diligent.API.Controllers | |||
| namespace Diligent.WebApi.Controllers | |||
| { | |||
| [Route("api/[controller]")] | |||
| [ApiController] | |||
| @@ -3,14 +3,14 @@ using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Threading.Tasks; | |||
| using AutoMapper; | |||
| using Diligent.API.Models; | |||
| using Diligent.API.Models.Users; | |||
| using Diligent.WebApi.Models; | |||
| using Diligent.WebApi.Models.Users; | |||
| using MediatR; | |||
| using Microsoft.AspNetCore.Authorization; | |||
| using Microsoft.AspNetCore.Http; | |||
| using Microsoft.AspNetCore.Mvc; | |||
| namespace Diligent.API.Controllers | |||
| namespace Diligent.WebApi.Controllers | |||
| { | |||
| //[ApiVersion("1.0.0")] // MAJOR.MINOR.PATCH | |||
| //[Route("api/{v:apiVersion}/users")] | |||
| @@ -1,17 +1,17 @@ | |||
| using MediatR; | |||
| using Diligent.API.Models.Users; | |||
| using Diligent.WebApi.Models.Users; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Threading.Tasks; | |||
| using Diligent.API.Models; | |||
| using Diligent.WebApi.Models; | |||
| using System.Threading; | |||
| using Diligent.Services.Interface; | |||
| using AutoMapper; | |||
| using FluentValidation; | |||
| using Diligent.API.Infrastructure.Results; | |||
| using Diligent.WebApi.Infrastructure.Results; | |||
| namespace Diligent.API.Handlers | |||
| namespace Diligent.WebApi.Handlers | |||
| { | |||
| public class UsersHandlers : IRequestHandler<GetQuery, Result<UserDto>>, | |||
| IRequestHandler<GetAllQuery, Result<IEnumerable<UserDto>>>, | |||
| @@ -1,4 +1,4 @@ | |||
| namespace Diligent.API.Infrastructure.Results | |||
| namespace Diligent.WebApi.Infrastructure.Results | |||
| { | |||
| public class Error | |||
| { | |||
| @@ -3,7 +3,7 @@ using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Threading.Tasks; | |||
| namespace Diligent.API.Infrastructure.Results | |||
| namespace Diligent.WebApi.Infrastructure.Results | |||
| { | |||
| public class Result<TResponse> | |||
| { | |||
| @@ -1,4 +1,4 @@ | |||
| namespace Diligent.API.Models | |||
| namespace Diligent.WebApi.Models | |||
| { | |||
| public class AddressDto | |||
| { | |||
| @@ -3,7 +3,7 @@ using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Threading.Tasks; | |||
| namespace Diligent.API.Models | |||
| namespace Diligent.WebApi.Models | |||
| { | |||
| public class UserDto | |||
| { | |||
| @@ -1,4 +1,4 @@ | |||
| namespace Diligent.API.Models.Users | |||
| namespace Diligent.WebApi.Models.Users | |||
| { | |||
| public class CreateForm | |||
| { | |||
| @@ -1,11 +1,11 @@ | |||
| using Diligent.API.Infrastructure.Results; | |||
| using Diligent.WebApi.Infrastructure.Results; | |||
| using MediatR; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Threading.Tasks; | |||
| namespace Diligent.API.Models.Users | |||
| namespace Diligent.WebApi.Models.Users | |||
| { | |||
| public class CreateRequest : IRequest<Result<string>> | |||
| { | |||
| @@ -1,7 +1,7 @@ | |||
| using Diligent.API.Infrastructure.Results; | |||
| using Diligent.WebApi.Infrastructure.Results; | |||
| using MediatR; | |||
| namespace Diligent.API.Models.Users | |||
| namespace Diligent.WebApi.Models.Users | |||
| { | |||
| public class DeleteRequest : IRequest<Result> | |||
| { | |||
| @@ -1,8 +1,8 @@ | |||
| using Diligent.API.Infrastructure.Results; | |||
| using Diligent.WebApi.Infrastructure.Results; | |||
| using MediatR; | |||
| using System.Collections.Generic; | |||
| namespace Diligent.API.Models.Users | |||
| namespace Diligent.WebApi.Models.Users | |||
| { | |||
| public class GetAllQuery : IRequest<Result<IEnumerable<UserDto>>> | |||
| { | |||
| @@ -1,10 +1,10 @@ | |||
| using Diligent.API.Infrastructure.Results; | |||
| using Diligent.WebApi.Infrastructure.Results; | |||
| using MediatR; | |||
| using System; | |||
| using System.Linq; | |||
| using System.Threading.Tasks; | |||
| namespace Diligent.API.Models.Users | |||
| namespace Diligent.WebApi.Models.Users | |||
| { | |||
| public class GetQuery : IRequest<Result<UserDto>> | |||
| { | |||
| @@ -1,4 +1,4 @@ | |||
| namespace Diligent.API.Models.Users | |||
| namespace Diligent.WebApi.Models.Users | |||
| { | |||
| public class UpdateForm | |||
| { | |||
| @@ -1,7 +1,7 @@ | |||
| using Diligent.API.Infrastructure.Results; | |||
| using Diligent.WebApi.Infrastructure.Results; | |||
| using MediatR; | |||
| namespace Diligent.API.Models.Users | |||
| namespace Diligent.WebApi.Models.Users | |||
| { | |||
| public class UpdateRequest : IRequest<Result> | |||
| { | |||
| @@ -7,7 +7,7 @@ using Microsoft.Extensions.Configuration; | |||
| using Microsoft.Extensions.Hosting; | |||
| using Microsoft.Extensions.Logging; | |||
| namespace Diligent.API | |||
| namespace Diligent.WebApi | |||
| { | |||
| public class Program | |||
| { | |||
| @@ -20,7 +20,7 @@ using Microsoft.IdentityModel.Tokens; | |||
| using Microsoft.OpenApi.Models; | |||
| using Swashbuckle.AspNetCore.SwaggerGen; | |||
| namespace Diligent.API | |||
| namespace Diligent.WebApi | |||
| { | |||
| public class Startup | |||
| { | |||