public ClienteEntity GetById(Guid key)
{
//Aqui não há necessidade de verificar se key é null, pois Guid é ValueType
var entity = _clienteRepository.GetById(key);
//Ao pedir um item não existente no repositório, representa um Exception no sistema
if (entity == null) throw new ArgumentNullException(nameof(entity));
return entity;
}
/// <summary>