예제 #1
0
        public async Task <ILanguage> AddAsync(string code, string name)
        {
            var entity = LanguageEntity.Create(code, name);
            await _tableStorage.InsertOrMergeAsync(entity);

            return(entity);
        }
예제 #2
0
 public async Task DeleteAsync(string code)
 {
     await _tableStorage.DeleteIfExistAsync(LanguageEntity.GeneratePartitionKey(), LanguageEntity.GenerateRowKey(code));
 }
예제 #3
0
 public async Task <IEnumerable <ILanguage> > GetAllAsync()
 {
     return(await _tableStorage.GetDataAsync(LanguageEntity.GeneratePartitionKey()));
 }