public void Update(UpdateAppleDto dto) { this._logger.LogWarning($"{nameof(AppleAppService)}.{nameof(Update)}(UpdateAppleDto dto) Invoke...."); if (Apples.ContainsKey(dto.Id)) { Apples[dto.Id] = dto.Name; } }
public async Task UpdateAppleAsync(UpdateAppleDto dto) { this._logger.LogWarning($"{nameof(AppleAppService)}.{nameof(UpdateAppleAsync)} Invoke...."); await Task.Run(() => { if (Apples.ContainsKey(dto.Id)) { Apples[dto.Id] = dto.Name; } }); }