public void Add(IList <Model.Relationship> list)
        {
            if (list == null || list.Count == 0)
            {
                return;
            }
            using (var conn = Database.Open())
            {
                var trans = conn.BeginTransaction();
                try
                {
                    string sql = RelationshipSql.Remove(list[0].ConsumerInfo.ConsumerDirectoryId);

                    conn.Execute(sql, trans);

                    foreach (var item in list)
                    {
                        var tuple = RelationshipSql.Add(item);
                        conn.Execute(tuple.Item1, (object)tuple.Item2, trans);
                    }

                    trans.Commit();
                }
                catch
                {
                    trans.Rollback();
                }
            }
        }
 public void Remove(int consumerDirectoryId)
 {
     using (var conn = Database.Open())
     {
         conn.Execute(RelationshipSql.Remove(consumerDirectoryId));
     }
 }