Beispiel #1
0
        public int Salvar(ServicoItemDTO dto)
        {
            string script = @"INSERT INTO tb_servico_item(id_servico, id_item)
                                                   VALUES(@id_servico, @id_item)";

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

            parms.Add(new MySqlParameter("id_servico", dto.ServicoId));
            parms.Add(new MySqlParameter("id_item", dto.ItemId));

            Database db = new Database();

            return(db.ExecuteInsertScriptWithPk(script, parms));
        }
        public int Salvar(ServicoItemDTO dto)
        {
            ServicoItemDatabase db = new ServicoItemDatabase();

            return(db.Salvar(dto));
        }