This is something that bothered me a lot at school.
Five years ago, when I learned SQL, I always wondered why we first specify the fields we want and then where we want them from.
According to my idea, we should write:
From Employee e
Select e.Name
So why does the norm say the following?
Select e.Name -- Eeeeek, what does e mean?
From Employee e -- Ok, now I know what e is
It took me weeks to understand SQL, and I know that a lot of that time was consumed by the wrong order of elements.
It is like writing in C#:
string name = employee.Name;
var employee = this.GetEmployee();
So, I assume that it has a historical reason. Why?
Linq
could not have used the standardizedSQL
syntax.