public async Task <ILanguage> FetchLanguage(Guid guid) { using (DbDataReader reader = await dbLanguage.GetOne(guid)) { if (reader.Read()) { Language language = new Language(); LoadFromReader(reader, language); return(language); } } return(null); }
public async Task <ILanguage> FetchLanguage(Guid guid, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); using (DbDataReader reader = await dbLanguage.GetOne(guid)) { if (reader.Read()) { Language language = new Language(); LoadFromReader(reader, language); return(language); } } return(null); }