Exemple #1
0
 public static void UpdateStudentAccount(StudentAccount studentAccount)
 {
     Console.WriteLine(
         $">> Updating the student account {studentAccount.StudentAccountId} in database..."
         );
     Thread.Sleep(1000);
     CachingServices.Invalidation.Invalidate(studentAccount);
 }
Exemple #2
0
        public static StudentAccount GetStudentAccount(int id)
        {
            Console.WriteLine($">> Retrieving the student account {id} from database...");
            Thread.Sleep(1000);
            var account = new StudentAccount {
                StudentAccountId = id
            };

            CachingServices.CurrentContext.AddDependency(account);
            return(account);
        }