Commit 84d14974 authored by hasan khaddour's avatar hasan khaddour

Initiate Solution Structure.

parent e141b55a
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace PSManagement.Api.Controllers
{
[ApiController]
[Route("[controller]")]
public class WeatherForecastController : ControllerBase
{
private static readonly string[] Summaries = new[]
{
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
};
private readonly ILogger<WeatherForecastController> _logger;
public WeatherForecastController(ILogger<WeatherForecastController> logger)
{
_logger = logger;
}
[HttpGet]
public IEnumerable<WeatherForecast> Get()
{
var rng = new Random();
return Enumerable.Range(1, 5).Select(index => new WeatherForecast
{
Date = DateTime.Now.AddDays(index),
TemperatureC = rng.Next(-20, 55),
Summary = Summaries[rng.Next(Summaries.Length)]
})
.ToArray();
}
}
}
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
namespace PSManagement.Api.DI
{
public static class DependencyInjection
{
public static IServiceCollection AddApi(this IServiceCollection services)
{
return services;
}
}
}
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.6.3" />
</ItemGroup>
</Project>
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 PSManagement.Api
{
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>();
});
}
}
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:39474",
"sslPort": 44359
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"PSManagement.Api": {
"commandName": "Project",
"dotnetRunMessages": "true",
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.HttpsPolicy;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Microsoft.OpenApi.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace PSManagement.Api
{
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)
{
services.AddControllers();
services.AddSwaggerGen(c =>
{
c.SwaggerDoc("v1", new OpenApiInfo { Title = "PSManagement.Api", Version = "v1" });
});
}
// 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();
app.UseSwagger();
app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "PSManagement.Api v1"));
}
app.UseHttpsRedirection();
app.UseRouting();
app.UseAuthorization();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
});
}
}
}
using System;
namespace PSManagement.Api
{
public class WeatherForecast
{
public DateTime Date { get; set; }
public int TemperatureC { get; set; }
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
public string Summary { get; set; }
}
}
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
}
}
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*"
}
using System;
namespace PSManagement.Application
{
public class Class1
{
}
}
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
namespace PSManagement.Application.DI
{
public static class DependencyInjection
{
public static IServiceCollection AddApplication(this IServiceCollection services)
{
return services;
}
}
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Folder Include="Common\" />
<Folder Include="Services\" />
<Folder Include="UseCases\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.2" />
</ItemGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
</Project>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PSManagement.Infrastructure.Common.Persistence
{
public class AppDbContext
{
}
}
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
namespace PSManagement.Infrastructure.DI
{
public static class DependencyInjection
{
public static IServiceCollection AddInfrastructure(this IServiceCollection services)
{
return services;
}
}
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Folder Include="Migrations\" />
<Folder Include="EntitiesConfiguration\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.2" />
</ItemGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Folder Include="Events\" />
<Folder Include="Abstraction\" />
<Folder Include="Interfaces\" />
<Folder Include="Exception\" />
</ItemGroup>
</Project>
...@@ -3,10 +3,82 @@ Microsoft Visual Studio Solution File, Format Version 12.00 ...@@ -3,10 +3,82 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16 # Visual Studio Version 16
VisualStudioVersion = 16.0.34601.136 VisualStudioVersion = 16.0.34601.136
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Source Code", "Source Code", "{016CB7CA-D962-4D88-BA4F-FE5A94F35C90}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{0FDF8D98-F5E9-4BEB-B801-36ED8F9E6763}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Api", "Api", "{A5B5B6F2-1390-4F70-8379-4FA9252043A3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PSManagement.Api", "PSManagement.Api\PSManagement.Api.csproj", "{CC2050CF-C358-4E97-8889-644924CFFFF6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PSManagement.Conracts", "PSManagement.Conracts\PSManagement.Conracts.csproj", "{AE250E90-861C-4E1E-BDB4-B19D17BD3906}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Conracts", "Conracts", "{8EEECA2A-3857-4081-A67C-49B9610FE5AE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PSManagement.Application", "PSManagement.Application\PSManagement.Application.csproj", "{1EA4D7A7-EF37-43C4-8704-223CD7F44162}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PSManagement.Domain", "PSManagement.Domain\PSManagement.Domain.csproj", "{34AD12C1-6312-4F2A-8297-645BC8221C8B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PSManagement.SharedKernel", "PSManagement.SharedKernel\PSManagement.SharedKernel.csproj", "{3507E59A-4B8B-4418-B1C6-0AD0C2697959}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PSManagement.Infrastructure", "PSManagement.Infrastructure\PSManagement.Infrastructure.csproj", "{E96488F4-9D4F-4890-A7A0-1085647C82A8}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Infrastructure", "Infrastructure", "{7C209DBF-1DB8-4E86-BD78-F689B70D5BD1}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Application", "Application", "{A8A58969-B142-4968-982B-16F771A7C805}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Domain", "Domain", "{F823B488-2A6B-40C0-B332-65C861DA40E3}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SharedKernel", "SharedKernel", "{9C4A8DA5-024F-48AD-BD57-37FC8AEBAFA2}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{CC2050CF-C358-4E97-8889-644924CFFFF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CC2050CF-C358-4E97-8889-644924CFFFF6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CC2050CF-C358-4E97-8889-644924CFFFF6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CC2050CF-C358-4E97-8889-644924CFFFF6}.Release|Any CPU.Build.0 = Release|Any CPU
{AE250E90-861C-4E1E-BDB4-B19D17BD3906}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AE250E90-861C-4E1E-BDB4-B19D17BD3906}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AE250E90-861C-4E1E-BDB4-B19D17BD3906}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AE250E90-861C-4E1E-BDB4-B19D17BD3906}.Release|Any CPU.Build.0 = Release|Any CPU
{1EA4D7A7-EF37-43C4-8704-223CD7F44162}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1EA4D7A7-EF37-43C4-8704-223CD7F44162}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1EA4D7A7-EF37-43C4-8704-223CD7F44162}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1EA4D7A7-EF37-43C4-8704-223CD7F44162}.Release|Any CPU.Build.0 = Release|Any CPU
{34AD12C1-6312-4F2A-8297-645BC8221C8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{34AD12C1-6312-4F2A-8297-645BC8221C8B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{34AD12C1-6312-4F2A-8297-645BC8221C8B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{34AD12C1-6312-4F2A-8297-645BC8221C8B}.Release|Any CPU.Build.0 = Release|Any CPU
{3507E59A-4B8B-4418-B1C6-0AD0C2697959}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3507E59A-4B8B-4418-B1C6-0AD0C2697959}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3507E59A-4B8B-4418-B1C6-0AD0C2697959}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3507E59A-4B8B-4418-B1C6-0AD0C2697959}.Release|Any CPU.Build.0 = Release|Any CPU
{E96488F4-9D4F-4890-A7A0-1085647C82A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E96488F4-9D4F-4890-A7A0-1085647C82A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E96488F4-9D4F-4890-A7A0-1085647C82A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E96488F4-9D4F-4890-A7A0-1085647C82A8}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{A5B5B6F2-1390-4F70-8379-4FA9252043A3} = {016CB7CA-D962-4D88-BA4F-FE5A94F35C90}
{CC2050CF-C358-4E97-8889-644924CFFFF6} = {A5B5B6F2-1390-4F70-8379-4FA9252043A3}
{AE250E90-861C-4E1E-BDB4-B19D17BD3906} = {8EEECA2A-3857-4081-A67C-49B9610FE5AE}
{8EEECA2A-3857-4081-A67C-49B9610FE5AE} = {016CB7CA-D962-4D88-BA4F-FE5A94F35C90}
{1EA4D7A7-EF37-43C4-8704-223CD7F44162} = {A8A58969-B142-4968-982B-16F771A7C805}
{34AD12C1-6312-4F2A-8297-645BC8221C8B} = {F823B488-2A6B-40C0-B332-65C861DA40E3}
{3507E59A-4B8B-4418-B1C6-0AD0C2697959} = {9C4A8DA5-024F-48AD-BD57-37FC8AEBAFA2}
{E96488F4-9D4F-4890-A7A0-1085647C82A8} = {7C209DBF-1DB8-4E86-BD78-F689B70D5BD1}
{7C209DBF-1DB8-4E86-BD78-F689B70D5BD1} = {016CB7CA-D962-4D88-BA4F-FE5A94F35C90}
{A8A58969-B142-4968-982B-16F771A7C805} = {016CB7CA-D962-4D88-BA4F-FE5A94F35C90}
{F823B488-2A6B-40C0-B332-65C861DA40E3} = {016CB7CA-D962-4D88-BA4F-FE5A94F35C90}
{9C4A8DA5-024F-48AD-BD57-37FC8AEBAFA2} = {016CB7CA-D962-4D88-BA4F-FE5A94F35C90}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5B34709A-AE37-4026-9182-CB9C7ADDEAF5} SolutionGuid = {5B34709A-AE37-4026-9182-CB9C7ADDEAF5}
EndGlobalSection EndGlobalSection
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment