public async Task <bool> DeleteNoticiaDto(DTO.NoticiaDTO noticiaDto) { await Eliminar <DTO.NoticiaDTO>(noticiaDto, false); modelEF.SaveChanges(); return(true); }
public static bool ValidaEliminacionNoticia(DTO.NoticiaDTO theNoticiaDTO, ref DataTable pobjDatatable) { bool retorno = false; YouCom.Service.BD.SQLHelper wobjSQLHelper = new YouCom.Service.BD.SQLHelper(); wobjSQLHelper.SetParametro("@idNoticia", SqlDbType.VarChar, 20, theNoticiaDTO.NoticiaId); try { //==================================================================================== if (wobjSQLHelper.Ejecutar("validaEliminacionNoticia", "YouCom", pobjDatatable) <= 0) { retorno = false; } else { retorno = true; } } catch (Exception eobjException) { throw eobjException; } return(retorno); }
public async Task <bool> CreateNoticiaDto(DTO.NoticiaDTO noticiaDto) { await Crear <DTO.NoticiaDTO>(noticiaDto, false); modelEF.SaveChanges(); modelEF.Noticia.Local.FirstOrDefault(); return(true); }
public async Task <OperationResult <bool> > DeleteNoticiaDto(DTO.NoticiaDTO Noticia) { try { var resultado = await informacionNoticia.DeleteNoticiaDto(Noticia); return(OperationResult <bool> .SuccessResponse(resultado)); } catch (System.Exception ex) { return(OperationResult <bool> .ErrorResponse(ex)); } }
public async Task <DTO.NoticiaDTO> GetBy_NoticiaDto(int Codigo) { DTO.NoticiaDTO noticia = ObtenerEntidadPorCondicion <DTO.NoticiaDTO>(t => t.Codigo == Codigo); return(await Task.FromResult(noticia)); }
public static bool Update(DTO.NoticiaDTO myNoticiaDTO) { bool resultado = NoticiaDAL.Update(myNoticiaDTO); return(resultado); }
public static bool Insert(DTO.NoticiaDTO myNoticiaDTO) { bool resultado = NoticiaDAL.Insert(myNoticiaDTO); return(resultado); }