示例#1
0
        internal List <T> StoredProcToList <T>(string storedproc, GenericMapper <T> mapper, params DbParameter[] @params) where T : new()
        {
            var list = new List <T>();

            StoredProcReaderForEach(storedproc, reader => list.Add(mapper.Map(reader)), @params);

            return(list);
        }
示例#2
0
        internal T StoredProcGetOne <T>(string storedproc, GenericMapper <T> mapper, params DbParameter[] @params) where T : new()
        {
            T ret = default(T);

            StoredProcReaderFirst(storedproc, reader => {
                ret = mapper.Map(reader);
            }, @params);
            return(ret);
        }