proyectos nuevos

This commit is contained in:
2026-09-21 11:04:37 +02:00
parent eaf6fe5f0f
commit 139d20b00a
11 changed files with 192 additions and 0 deletions

View File

@@ -19,6 +19,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GestionaDenuncias.Shared",
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApiOPE", "ApiOPE\ApiOPE.csproj", "{EB6E98EA-6A41-473F-BA2E-0927ABBAB4C5}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApiOPE", "ApiOPE\ApiOPE.csproj", "{EB6E98EA-6A41-473F-BA2E-0927ABBAB4C5}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "bdAntifraudeMYSQL", "bdAntifraudeMYSQL\bdAntifraudeMYSQL.csproj", "{637125ED-E012-4DBA-BBB4-1607A3445172}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SwaggerAntifraudeMYSQL", "SwaggerAntifraudeMYSQL\SwaggerAntifraudeMYSQL.csproj", "{F2C2A0C4-FFA7-4B91-AB09-C1190680C96F}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@@ -125,6 +129,30 @@ Global
{EB6E98EA-6A41-473F-BA2E-0927ABBAB4C5}.Release|x64.Build.0 = Release|Any CPU {EB6E98EA-6A41-473F-BA2E-0927ABBAB4C5}.Release|x64.Build.0 = Release|Any CPU
{EB6E98EA-6A41-473F-BA2E-0927ABBAB4C5}.Release|x86.ActiveCfg = Release|Any CPU {EB6E98EA-6A41-473F-BA2E-0927ABBAB4C5}.Release|x86.ActiveCfg = Release|Any CPU
{EB6E98EA-6A41-473F-BA2E-0927ABBAB4C5}.Release|x86.Build.0 = Release|Any CPU {EB6E98EA-6A41-473F-BA2E-0927ABBAB4C5}.Release|x86.Build.0 = Release|Any CPU
{637125ED-E012-4DBA-BBB4-1607A3445172}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{637125ED-E012-4DBA-BBB4-1607A3445172}.Debug|Any CPU.Build.0 = Debug|Any CPU
{637125ED-E012-4DBA-BBB4-1607A3445172}.Debug|x64.ActiveCfg = Debug|Any CPU
{637125ED-E012-4DBA-BBB4-1607A3445172}.Debug|x64.Build.0 = Debug|Any CPU
{637125ED-E012-4DBA-BBB4-1607A3445172}.Debug|x86.ActiveCfg = Debug|Any CPU
{637125ED-E012-4DBA-BBB4-1607A3445172}.Debug|x86.Build.0 = Debug|Any CPU
{637125ED-E012-4DBA-BBB4-1607A3445172}.Release|Any CPU.ActiveCfg = Release|Any CPU
{637125ED-E012-4DBA-BBB4-1607A3445172}.Release|Any CPU.Build.0 = Release|Any CPU
{637125ED-E012-4DBA-BBB4-1607A3445172}.Release|x64.ActiveCfg = Release|Any CPU
{637125ED-E012-4DBA-BBB4-1607A3445172}.Release|x64.Build.0 = Release|Any CPU
{637125ED-E012-4DBA-BBB4-1607A3445172}.Release|x86.ActiveCfg = Release|Any CPU
{637125ED-E012-4DBA-BBB4-1607A3445172}.Release|x86.Build.0 = Release|Any CPU
{F2C2A0C4-FFA7-4B91-AB09-C1190680C96F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F2C2A0C4-FFA7-4B91-AB09-C1190680C96F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F2C2A0C4-FFA7-4B91-AB09-C1190680C96F}.Debug|x64.ActiveCfg = Debug|Any CPU
{F2C2A0C4-FFA7-4B91-AB09-C1190680C96F}.Debug|x64.Build.0 = Debug|Any CPU
{F2C2A0C4-FFA7-4B91-AB09-C1190680C96F}.Debug|x86.ActiveCfg = Debug|Any CPU
{F2C2A0C4-FFA7-4B91-AB09-C1190680C96F}.Debug|x86.Build.0 = Debug|Any CPU
{F2C2A0C4-FFA7-4B91-AB09-C1190680C96F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F2C2A0C4-FFA7-4B91-AB09-C1190680C96F}.Release|Any CPU.Build.0 = Release|Any CPU
{F2C2A0C4-FFA7-4B91-AB09-C1190680C96F}.Release|x64.ActiveCfg = Release|Any CPU
{F2C2A0C4-FFA7-4B91-AB09-C1190680C96F}.Release|x64.Build.0 = Release|Any CPU
{F2C2A0C4-FFA7-4B91-AB09-C1190680C96F}.Release|x86.ActiveCfg = Release|Any CPU
{F2C2A0C4-FFA7-4B91-AB09-C1190680C96F}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View File

@@ -0,0 +1,33 @@
using Microsoft.AspNetCore.Mvc;
namespace SwaggerAntifraudeMYSQL.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(Name = "GetWeatherForecast")]
public IEnumerable<WeatherForecast> Get()
{
return Enumerable.Range(1, 5).Select(index => new WeatherForecast
{
Date = DateOnly.FromDateTime(DateTime.Now.AddDays(index)),
TemperatureC = Random.Shared.Next(-20, 55),
Summary = Summaries[Random.Shared.Next(Summaries.Length)]
})
.ToArray();
}
}
}

View File

@@ -0,0 +1,25 @@
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
app.Run();

View File

@@ -0,0 +1,41 @@
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:45679",
"sslPort": 44384
}
},
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:5274",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "https://localhost:7045;http://localhost:5274",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

View File

@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,6 @@
@SwaggerAntifraudeMYSQL_HostAddress = http://localhost:5274
GET {{SwaggerAntifraudeMYSQL_HostAddress}}/weatherforecast/
Accept: application/json
###

View File

@@ -0,0 +1,13 @@
namespace SwaggerAntifraudeMYSQL
{
public class WeatherForecast
{
public DateOnly Date { get; set; }
public int TemperatureC { get; set; }
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
public string? Summary { get; set; }
}
}

View File

@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}

View File

@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}

View File

@@ -0,0 +1,7 @@
namespace bdAntifraudeMYSQL
{
public class Class1
{
}
}

View File

@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>