public List<MetaTag> GetMT() { List<MetaTag> list = null; DataProvider.ExecuteCmd(GetConnection, "dbo.MetaTags_Select" , inputParamMapper: delegate (SqlParameterCollection paramCollection) { } , map: delegate (IDataReader reader, short set) { MetaTag m = new MetaTag(); MapMetaTag(reader, m); if (list == null) { list = new List<MetaTag>(); } list.Add(m); } ); return list; }
private void MapMetaTag(IDataReader reader, MetaTag m) { int startingIndex = 0; m.Id = reader.GetSafeInt32(startingIndex++); m.Name = reader.GetSafeString(startingIndex++); m.Description = reader.GetSafeString(startingIndex++); m.Example = reader.GetSafeString(startingIndex++); m.Template = reader.GetSafeString(startingIndex++); m.DateAdded = reader.GetSafeDateTime(startingIndex++); m.DateModified = reader.GetSafeDateTime(startingIndex++); m.LanguageCode = reader.GetSafeString(startingIndex++); }