public int Delete(object keyValue) { var keyName = GetPrimaryKey(); var q = QueryAdapter .CreateQueryDelete( GetTableName() , keyName ); q.Parameters.Add(keyName, keyValue); return(QueryAdapter.Execute(q)); }
public int Insert( T entity ) { var fields = entity .GetFields() .Where(p => !p.IsIdentity) .ToList(); return (QueryAdapter .Execute( QueryAdapter .CreateQueryInsert( GetTableName() , fields ) )); }
public int Update( T row , IDbTransaction transaction ) { var fields = row .GetFields() .ToList(); return (QueryAdapter .Execute( QueryAdapter .CreateQueryUpdate( GetTableName() , fields , transaction ) )); }