π
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Consultas | |
public async Task<IEnumerable<Empleado>> EmpleadoConMenosDe5Ventas() | |
{ | |
var fechaInicial = new DateTime(2023, 1, 1); | |
var fechaFinal = new DateTime(2023, 12, 31); | |
var empleadosConMenosDe5Ventas = await _context.Empleados | |
.Where(e => e.Ventas | |
.Count(v => v.FechaVenta >= fechaInicial && v.FechaVenta <= fechaFinal) < 5) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Controllers: | |
[HttpGet("GetAllProveedorConMedicamentoMenos50U")] | |
//[Authorize(Roles="")] | |
[ProducesResponseType(StatusCodes.Status200OK)] | |
[ProducesResponseType(StatusCodes.Status400BadRequest)] | |
public async Task<ActionResult<IEnumerable<ProveedorDto>>> GetAllProveedorConMedicamentoMenos50U() | |
{ | |
IEnumerable<Proveedor> Proveedores = await _unitOfWork.Proveedores.ProveedoresMedicamentos(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AspNetCoreRateLimit | |
AutoMapper.Extensions.Microsoft.DependencyInjection | |
Microsoft.AspNetCore.Hosting | |
Microsoft.Extensions.Hosting | |
Microsoft.AspNetCore.Mvc.Versioning |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// API | |
Controllers | |
Dtos | |
Extensions | |
Helpers | |
Profiles | |
Services | |
// Aplicacion | |
Repository |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// IncidenciasContext | |
using System.Reflection; | |
using Dominio; | |
using Microsoft.EntityFrameworkCore; | |
namespace Persistencia | |
{ | |
public class IncidenciasContext : DbContext | |
{ | |
public IncidenciasContext(DbContextOptions<IncidenciasContext> options) : base(options) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// AreaConfiguration | |
using Dominio; | |
using Microsoft.EntityFrameworkCore; | |
using Microsoft.EntityFrameworkCore.Metadata.Builders; | |
namespace Infrastructure.Data.Configuration; | |
public class AreaConfiguration : IEntityTypeConfiguration<Area> | |
{ | |
public void Configure(EntityTypeBuilder<Area> builder) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// AreaRepository | |
namespace Dominio.Interfaces; | |
public interface IAreaRepository : IGenericRepositoryB<Area> | |
{ | |
} | |
/////////////////////////////////////////////////////////////////////////////////////// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// UnitOfWork | |
using Aplicacion.Repository; | |
using Dominio; | |
using Dominio.Interfaces; | |
using Persistencia; | |
namespace Aplicacion.UnitOfWork | |
{ | |
public class UnitOfWork : IUnitOfWork, IDisposable | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//AreaRepository | |
using Dominio; | |
using Dominio.Interfaces; | |
using Microsoft.EntityFrameworkCore; | |
using Persistencia; | |
namespace Aplicacion.Repository | |
{ | |
public class AreaRepository : GenericRepositoryB<Area>, IAreaRepository |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Reflection; | |
using System.Text; | |
using ApiIncidencias.Extensions; | |
using AspNetCoreRateLimit; | |
using Microsoft.AspNetCore.Authentication.JwtBearer; | |
using Microsoft.EntityFrameworkCore; | |
using Microsoft.IdentityModel.Tokens; | |
using Persistencia; | |
var builder = WebApplication.CreateBuilder(args); |
NewerOlder