public int InsertPlot(PlotBE plotBE) { using (IDbConnection db = new NpgsqlConnection(ConfigurationManager.ConnectionStrings["Postgres"].ConnectionString)) { string sqlQuery = "INSERT INTO visitas.trama values (@id_trama,@cabecera,@fecha,@puerto,@ip_antena,@trama,@procesado) "; int rowsAffected = db.Execute(sqlQuery, plotBE); return(rowsAffected); } }
public void InsertPlot(PlotBE plotBE) { new PlotDA().InsertPlot(plotBE); }