Ejemplo n.º 1
0
        public static IList <T> GetResultsHasSpaces <T>(this TwitterBroadcastSystemModel.TBSEntities entities, DbDataReader reader) where T : new()
        {
            var result = new List <T>();

            while (reader.Read())
            {
                var row = new T();
                for (var fieldCount = 0; fieldCount < reader.FieldCount; fieldCount++)
                {
                    var prop = reader.GetName(fieldCount);
                    reader.SetValue(row, prop);
                }
                result.Add(row);
            }

            return(result);
        }
Ejemplo n.º 2
0
 public Handler()
 {
     _TBSEntities = new TwitterBroadcastSystemModel.TBSEntities();
 }
Ejemplo n.º 3
0
        public static IList <T> GetResults <T>(this TwitterBroadcastSystemModel.TBSEntities entities, DbDataReader reader)
        {
            var result = ((IObjectContextAdapter)entities).ObjectContext.Translate <T>(reader);

            return(result.ToList());
        }