private static T OnLoad <T>(IConnectinContext cc, string table, string id, object value) where T : IEntityState, new() { Command cmd = Command.GetThreadCommand().AddSqlText(table).AddSqlText(" where ").AddSqlText(id).AddSqlText("=@id");// new Command(table + " where " + id + "=@id"); cmd.AddParameter("id", value); return(cc.Load <T>(cmd)); }