Welcome back.
In this video, I'm going to give you a gentle introduction to Link.
And link is used to retrieving data from a data source.
And by using a link query operation, you can get data from different types of data sources, and that's
exactly what the power of link is all about.
So Array's database is XML files and many more sources are valid for a query operation.
Let's look at the three parts of a query operation.
So obtain a data source, create a query, execute the query.
So that's always the three steps that you need in order to actually get some data or adjust some data.
So example usage, you should print out the entries of a string array sorted by name.
So here we have an array called names and there is Berta, clause and Atom.
So the first step is our data source, which is our names string.
The second step is the query creation.
So we create this query called Var query equals from name in names, order by name, ascending select
name.
So we go through all the names, then we order them by ascending, which means we get them in an alphabetic
order and then we select name.
Now what we can do is we can go and create a query execution by using it for each loop where we go ahead
and run through every single element of the query and print it out onto the console.
So console, right line.
And then I so the output will be Adam, Roberta and Klaus.
So what we did here is we just reordered the entry of the data that we had and we didn't change the
string itself.
We just printed it in a different way for us, except usage.
You should print out the entries of an entire array sorted by their size, but ignore values that are
smaller than five.
So here, another one where you see the data source is this numbers array which contains four values
7513 and 125, and then of course the four as well, which does not fit our criteria.
So the query creation is as follows where query from number in numbers.
So we say, okay, we want to check every single number in numbers and we want to go ahead and only
use the numbers which are greater than five.
And we ordered them descending, which means we go from top to bottom.
So from the highest number to the lowest number, and then we select that number.
So what our four each two.
So our query execution will now give us is the output of 135, 75 and 13.
So four will not be included because it doesn't fit our criteria, which was where number creator five
So what you can see here.
Of course, you can make this a lot more complex.
You can get a lot more kinds of limits or filters onto your data.
And that's, of course, the power that we have here.
Now, this is a very, very gentle and basic explanation of what you can do with Link, but we only
looked at arrays.
Of course, you can also get the data from different data sources and Lync will behave the exact same
way.
And that's really the power of Lync because it doesn't care about the data source.
It can work with it either way.
So it can work with a race.
It can work with XML and it can work with databases.
And we're going to look into those in more detail, of course, in the following videos.
So I hope you enjoy it.
It's going to be a more advanced topic, but at the same time you're going to learn to really use the
skills that you have acquired so far at a very realistic or real life use.
So I hope you enjoy it and see you in the next video.