예제 #1
0
        public int Salvar(ItemComprasDTO dto)
        {
            string script = @"INSERT INTO tb_item_compra(id_item, id_compra) VALUES(@id_item, @id_compra)";

            List <MySqlParameter> parms = new List <MySqlParameter>();

            parms.Add(new MySqlParameter("id_item", dto.ItemId));
            parms.Add(new MySqlParameter("id_compra", dto.CompraId));

            Database db = new Database();

            return(db.ExecuteInsertScriptWithPk(script, parms));
        }
예제 #2
0
        public int Salvar(ItemComprasDTO dto)
        {
            ItemComprasDatabase db = new ItemComprasDatabase();

            return(db.Salvar(dto));
        }