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); }
public GenericMapper <T> build() { var mapper = new GenericMapper <T>(); mapper.Overrides = _overrides.ToArray(); mapper.Mappings = _mappings.ToArray(); mapper.PostMapAction = _postMapAction; mapper.ColumnIgnores = _columnIgnores; return(mapper); }
public List <Kingdom> GetKingdomList() { var mapper = new GenericMapper <Kingdom>(); return(StoredProcToList("spBiotaDefKingdomList", mapper)); }