Beispiel #1
0
 public Testimonio CreateTestimonio(Testimonio test)
 {
     try
     {
         using (con)
         {
             Testimonio testi = con.Query <Testimonio>(("spCreateTestimonio"), new { nombre_test = test.nombre_test, opinion_test = test.opinion_test, img_test = test.img_test }, commandType: CommandType.StoredProcedure).FirstOrDefault();
             return(testi);
         }
     }
     catch (Exception ex)
     {
         throw new ApplicationException("spCreateTestimonio" + ex.Message);
     }
 }
Beispiel #2
0
 public int UpdateTestimonio(Testimonio test)
 {
     try
     {
         using (con)
         {
             int filas = con.Execute(("spUpdateTestimonio"), new { id_test = test.id_test, nombre_test = test.nombre_test, opinion_test = test.opinion_test, img_test = test.img_test }, commandType: CommandType.StoredProcedure);
             return(filas);
         }
     }
     catch (Exception ex)
     {
         throw new ApplicationException("spUpdateTestimonio" + ex.Message);
     }
 }