I have seen a video where at different windows, the presenter follows different styles.
For instance:
In one window, he uses like this below:
EmployeeViewModel evm = (EmployeeViewModel)this.DataContext;
evm.Display();
In another, he uses like:
EmployeeViewModel evm = new EmployeeViewModel();
evm.Display();
Whats the difference technically and the best way to use ? Please help me understand the difference.