Example #1
0
 private static void GetAllStudentsFromRedisList(RedisList <Student> students)
 {
     for (int i = 0; i < students.Count; i++)
     {
         Console.WriteLine(string.Format("{0} {1} {2}",
                                         students[i].ROLL,
                                         students[i].USN,
                                         students[i].FullName));
     }
 }
Example #2
0
        private static RedisList <Student> BuildStudentsRedisCollection(string keyName,
                                                                        IEnumerable <Student> students)
        {
            var redisCollection = new RedisList <Student>(keyName,
                                                          Connection);

            foreach (var student in students)
            {
                redisCollection.Add(student);
            }
            return(redisCollection);
        }