Exemplo n.º 1
0
        public long AddRange(IEnumerable <TEntity> entities)
        {
            long id = 0;

            using (var conn = new WrappedDbConnection(ConnectionFactory.GetDBConnecton(this._connectionString, this._dbAdapter)))
            {
                id = conn.Insert(entities);
                conn.Close();
            }
            return(id);
        }
Exemplo n.º 2
0
        public long Add <T>(T entity) where T : class
        {
            long id = 0;

            using (var conn = new WrappedDbConnection(ConnectionFactory.GetDBConnecton(this._connectionString, this._dbAdapter)))
            {
                id = conn.Insert(entity);
                conn.Close();
            }
            return(id);
        }