Beispiel #1
0
        public T SelectOne <T>(T t) where T : IdentityObj
        {
            SqlConnection conn        = cm.GetConnection();
            QuerySingle   querySingle = new PreparedSelectSingle();
            T             t1          = querySingle.SelectOne <T>(conn, t);

            cm.CloseConn(conn);
            return(t1);
        }
Beispiel #2
0
        public T SelectOne <T>(string sql) where T : BasicObj
        {
            SqlConnection conn        = cm.GetConnection();
            QuerySingle   querySingle = new PreparedSelectSingle();
            T             t1          = querySingle.SelectOne <T>(conn, sql);

            cm.CloseConn(conn);
            return(t1);
        }
Beispiel #3
0
        public IDictionary <string, object> SelectOneData(string sql)
        {
            SqlConnection conn               = cm.GetConnection();
            QuerySingle   querySingle        = new PreparedSelectSingle();
            IDictionary <string, object> dic = querySingle.SelectOneData(conn, sql);

            cm.CloseConn(conn);
            return(dic);
        }