Last active
December 14, 2017 19:42
-
-
Save thiagoloureiro/9facfddc56bfb01d644575add6233a9d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CustomerService | |
{ | |
[CacheableResult(600)] // 600 seconds, 10 minutes cache policy | |
public List<dynamic> ReturnCustomer() | |
{ | |
var lstCustomer = new List<dynamic>(); | |
var customer = new Customer | |
{ | |
Id = 1, | |
Name = "Acme Inc", | |
Email = "[email protected]" | |
}; | |
var customer1 = new Customer | |
{ | |
Id = 2, | |
Name = "Marvel Inc", | |
Email = "[email protected]" | |
}; | |
lstCustomer.Add(customer); | |
lstCustomer.Add(customer1); | |
return lstCustomer; | |
} | |
[AffectedCacheableMethods("ReturnCustomer")] | |
public bool UpdateCustomer() | |
{ | |
return true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment