Exemple #1
0
 public ExcluirPlayListResponse ExcluirPlayList(ExcluirPlayListRequest pExcluirPlayListRequest)
 {
     try
     {
         var excluirPlayList = _canalIlhasDAL.ExcluirPlayList(pExcluirPlayListRequest);
         return(new ExcluirPlayListResponse {
             Mensagem = MensagensService.SUCESSO
         });
     }
     catch (Exception e)
     {
         throw;
     }
 }
Exemple #2
0
        public Int64 ExcluirPlayList(ExcluirPlayListRequest pExcluirPlayListRequest)
        {
            using (OracleConnection conexao = new OracleConnection(_configuration.GetConnectionString("DESENV")))
            {
                Int64 SQ = 1;

                var sSql       = String.Format("DELETE FROM TB_CILHAS_UPLOAD_PLAYLIST WHERE CD_PLAYLIST = {0}", pExcluirPlayListRequest.PlayList.ID_PLAYLIST);
                var executeSql = conexao.Execute(sSql, null, commandType: CommandType.Text);

                sSql       = String.Format("DELETE FROM TB_CILHAS_PLAYLIST WHERE ID_PLAYLIST = {0}", pExcluirPlayListRequest.PlayList.ID_PLAYLIST);
                executeSql = conexao.Execute(sSql, null, commandType: CommandType.Text);

                //    conexao.Open();
                //    OracleCommand command = conexao.CreateCommand();
                //    OracleTransaction transaction = conexao.BeginTransaction();
                //    try
                //    {
                //        var sSql = "DELETE FROM TB_CILHAS_UPLOAD_PLAYLIST WHERE CD_PLAYLIST = CD_PLAYLIST";
                //        var pTranparameters = new { CD_PLAYLIST = pExcluirPlayListRequest.PlayList.ID_PLAYLIST };
                //        conexao.Execute(sSql, pTranparameters, transaction);

                //        sSql = "DELETE FROM TB_CILHAS_PLAYLIST WHERE ID_PLAYLIST = ID_PLAYLIST";
                //        var sTranparameters = new { ID_PLAYLIST = pExcluirPlayListRequest.PlayList.ID_PLAYLIST };
                //        conexao.Execute(sSql, sTranparameters, transaction);

                //        transaction.Commit();
                //        conexao.Close();

                return(SQ);
                //    }
                //    catch (Exception)
                //    {
                //        transaction.Rollback();
                //        conexao.Close();
                //        throw;
                //    }
            }
            //using (OracleConnection conexao = new OracleConnection(_configuration.GetConnectionString("DESENV")))
            //{
            //    var sSql = String.Format("DELETE FROM TB_CILHAS_PLAYLIST WHERE ID_PLAYLIST = {0}", pExcluirPlayListRequest.PlayList.ID_PLAYLIST);
            //    return conexao.Execute(sSql, null, commandType: CommandType.Text);
            //}
        }
 public ExcluirPlayListResponse ExcluirPlayList(ExcluirPlayListRequest pExcluirPlayListRequest)
 {
     return(_canalIlhasService.ExcluirPlayList(pExcluirPlayListRequest));
 }
Exemple #4
0
 public ExcluirPlayListResponse ExcluirPlayList(ExcluirPlayListRequest pExcluirPlayListRequest)
 {
     return(Http.Delete <ExcluirPlayListResponse>("v1/api/CanalIlhas/ExcluirPlayList", pExcluirPlayListRequest));
 }