public dynamic QuerySingle() { dynamic item = null; this.Data.Execute.ExecuteQuery(true, () => { var autoMapper = new DynamicTypAutoMapper(this.Data); if (this.Data.Reader != null && this.Data.Reader.Read()) { item = autoMapper.AutoMap(); } }); return(item); }
public List <dynamic> Query() { List <dynamic> items = null; this.Data.Execute.ExecuteQuery(true, () => { items = new List <dynamic>(); var autoMapper = new DynamicTypAutoMapper(this.Data); if (this.Data.Reader != null) { while (this.Data.Reader.Read()) { var item = autoMapper.AutoMap(); items.Add(item); } } }); return(items); }