diff --git a/DTO/Operaciones/DTOOpViajesServicios.cs b/DTO/Operaciones/DTOOpViajesServicios.cs new file mode 100644 index 0000000..e589e2d --- /dev/null +++ b/DTO/Operaciones/DTOOpViajesServicios.cs @@ -0,0 +1,11 @@ +namespace AOLBackend.DTO.Operaciones +{ + public class DTOOpViajesServicios + { + public int id { get; set; } = 0; + public int IdViaje { get; set; } = 0; + public int IdServicio { get; set; } = 0; + public string Servicio { get; set; } = null!; + public byte Activo { get; set; } = 1; + } +} \ No newline at end of file diff --git a/Models/Operaciones/IOpViajesServicios.cs b/Models/Operaciones/IOpViajesServicios.cs new file mode 100644 index 0000000..aec13d9 --- /dev/null +++ b/Models/Operaciones/IOpViajesServicios.cs @@ -0,0 +1,10 @@ +namespace AOLBackend.Models.Operaciones +{ + public class IOpViajesServicios + { + public int id { get; set; } = 0; + public int IdViaje { get; set; } = 0; + public int IdServicio { get; set; } = 0; + public byte Activo { get; set; } = 1; + } +} \ No newline at end of file diff --git a/Repository/Operaciones/OpViajesRepository.cs b/Repository/Operaciones/OpViajesRepository.cs index 1bca2ff..67bc9c2 100644 --- a/Repository/Operaciones/OpViajesRepository.cs +++ b/Repository/Operaciones/OpViajesRepository.cs @@ -1,6 +1,7 @@ using AOLBackend.Context; using AOLBackend.Contracts.Operaciones; using AOLBackend.DTO.Operaciones; +using AOLBackend.Models.Operaciones; using Dapper; using System.Data; @@ -45,7 +46,13 @@ namespace AOLBackend.Repository.Operaciones var entrada = await connection.QueryAsync(query, new { }, commandType: CommandType.StoredProcedure); return entrada; } - + public async Task> GetAllServices() + { + var query = "[Operaciones.Viajes.Servicios.Get]"; + using var connection = _context.CreateConnection(); + var entrada = await connection.QueryAsync(query, new { }, commandType: CommandType.StoredProcedure); + return entrada; + } public async Task Delete(int id) { var query = "[Operaciones.Viajes.Delete]"; diff --git a/obj/Debug/net6.0/AOLBackend.GeneratedMSBuildEditorConfig.editorconfig b/obj/Debug/net6.0/AOLBackend.GeneratedMSBuildEditorConfig.editorconfig index aa0a97e..fc61964 100644 --- a/obj/Debug/net6.0/AOLBackend.GeneratedMSBuildEditorConfig.editorconfig +++ b/obj/Debug/net6.0/AOLBackend.GeneratedMSBuildEditorConfig.editorconfig @@ -8,9 +8,9 @@ build_property.PlatformNeutralAssembly = build_property._SupportedPlatformList = Linux,macOS,Windows build_property.RootNamespace = AOLBackend build_property.RootNamespace = AOLBackend -build_property.ProjectDir = C:\projects\staging\AOLBackend\ +build_property.ProjectDir = c:\projects\staging\AOLBackend\ build_property.RazorLangVersion = 6.0 build_property.SupportLocalizedComponentNames = build_property.GenerateRazorMetadataSourceChecksumAttributes = -build_property.MSBuildProjectDirectory = C:\projects\staging\AOLBackend +build_property.MSBuildProjectDirectory = c:\projects\staging\AOLBackend build_property._RazorSourceGeneratorDebug = diff --git a/obj/Debug/net6.0/AOLBackend.assets.cache b/obj/Debug/net6.0/AOLBackend.assets.cache index 20a4db6..1389778 100644 Binary files a/obj/Debug/net6.0/AOLBackend.assets.cache and b/obj/Debug/net6.0/AOLBackend.assets.cache differ diff --git a/obj/staticwebassets.pack.sentinel b/obj/staticwebassets.pack.sentinel index 16bd282..6fbca2a 100644 --- a/obj/staticwebassets.pack.sentinel +++ b/obj/staticwebassets.pack.sentinel @@ -88,3 +88,9 @@ 2.0 2.0 2.0 +2.0 +2.0 +2.0 +2.0 +2.0 +2.0