public virtual sysdiagramsRow GetByPrimaryKey(int diagram_id) { string whereSql = "[diagram_id]=" + _db.CreateSqlParameterName("Diagram_id"); IDbCommand cmd = CreateGetCommand(whereSql, null); AddParameter(cmd, "Diagram_id", diagram_id); sysdiagramsRow[] tempArray = MapRecords(cmd); return(0 == tempArray.Length ? null : tempArray[0]); }