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); }
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); }