Beispiel #1
0
        public async Task <bool> DeleteCompaniaDto(DTO.CompaniaDTO companiaDto)
        {
            await Eliminar <DTO.CompaniaDTO>(companiaDto, false);

            modelEF.SaveChanges();
            return(true);
        }
Beispiel #2
0
        public async Task <bool> CreateCompaniaDto(DTO.CompaniaDTO companiaDto)
        {
            await Crear <DTO.CompaniaDTO>(companiaDto, false);

            modelEF.SaveChanges();
            modelEF.Compania.Local.FirstOrDefault();
            return(true);
        }
Beispiel #3
0
        public async Task <OperationResult <bool> > DeleteCompaniaDto(DTO.CompaniaDTO Compania)
        {
            try
            {
                var resultado = await informacionCompania.DeleteCompaniaDto(Compania);

                return(OperationResult <bool> .SuccessResponse(resultado));
            }
            catch (System.Exception ex)
            {
                return(OperationResult <bool> .ErrorResponse(ex));
            }
        }
Beispiel #4
0
 public async Task <DTO.CompaniaDTO> GetBy_CompaniaDto(long Codigo)
 {
     DTO.CompaniaDTO compania = ObtenerEntidadPorCondicion <DTO.CompaniaDTO>(t => t.Codigo == Codigo);
     return(await Task.FromResult(compania));
 }