public ActionResult AddStudent() { Student s = new Student(); s.Name = "111"; s.Age = 12; s.Score = 100; StudentService ss = new StudentService(); ss.Add(s); var list = ss.GetStudent(); return Content(""); }
public void AddMore() { //using (var redisClient = RedisManager.GetClient()) //{ for (int i = 0; i < 7000; i++) { string key = "student" + i; Student st = new Student() { Name = Guid.NewGuid().ToString("N"), Score = 20, techer = new Techer() { Name = "我是老师", Description = "这是描述" } }; _cacheStrategy.Add(key, st, 30); } //} }