Example #1
0
 public async Task <string> CreateAsync(string url, string key = null) =>
 await _microUrlStore.CreateAsync(new MicroUrl
 {
     Key     = await _microUrlKeyGenerator.GenerateKeyAsync(key),
     Enabled = true,
     Url     = url
 });
Example #2
0
 public async Task <string> CreateAsync(string language, string content)
 {
     return(await _microTextStore.CreateAsync(new MicroText
     {
         Key = await _keyGenerator.GenerateKeyAsync(),
         Enabled = true,
         Language = language,
         Text = content
     }));
 }