This document now exists on the official ASP.NET core docs page.
- Application
- Request Handling
public interface IDistributedCache | |
{ | |
T? GetOrCreate(string key, Func<DistributedCacheEntryOptions, T> factory) | |
{ | |
var bytes = Get(key); | |
if (bytes is { Length: > 0 }) | |
{ | |
var payload = Encoding.UTF8.GetString(bytes); | |
return JsonSerializer.Deserialize<T>(payload); | |
} |
This document now exists on the official ASP.NET core docs page.
// GitHub: 👨🏽💻 https://github.com/ievangelist | |
// Twitter: 🤓 https://twitter.com/davidpine7 | |
// SDK: 🛠️ https://github.com/IEvangelist/azure-cosmos-dotnet-repository | |
using System.ComponentModel.DataAnnotations; | |
using Microsoft.Azure.CosmosRepository; | |
var builder = WebApplication.CreateBuilder(args); | |
builder.Services.AddCosmosRepository(); |
private static readonly string[] tenHoursOfFun = | |
{ | |
"https://www.youtube.com/watch?v=wbby9coDRCk", | |
"https://www.youtube.com/watch?v=nb2evY0kmpQ", | |
"https://www.youtube.com/watch?v=eh7lp9umG2I", | |
"https://www.youtube.com/watch?v=z9Uz1icjwrM", | |
"https://www.youtube.com/watch?v=Sagg08DrO5U", | |
"https://www.youtube.com/watch?v=5XmjJvJTyx0", | |
"https://www.youtube.com/watch?v=IkdmOVejUlI", | |
"https://www.youtube.com/watch?v=jScuYd3_xdQ", |
$/
artifacts/
build/
docs/
lib/
packages/
samples/
src/
tests/