public async Task <T> GetByIdAsync(string id) { var result = await IEntityCacheService.GetByIdAsync <T>(id); if (result == null) { result = await IDatabaseService.GetByIdAsync <T>(id); if (result != null) { await IEntityCacheService.SetAsync(result); } } return(result); }
public async Task <T> GetByNameAsync(string name) { var id = await IIdTranslationService.GetIdByNameAsync <T>(name); return(await IEntityCacheService.GetByIdAsync <T>(id)); }
public async Task <T> GetByAutoIdAsync(ulong autoId) { var id = await IIdTranslationService.GetIdByAutoIdAsync <T>(autoId); return(await IEntityCacheService.GetByIdAsync <T>(id)); }