public static async Task <long> GetCurrentAndIncrementAsync(this ICounterRepository repository) { var value = await repository.GetCurrentAsync(); await repository.IncrementAsync(); return(value); }