private void Window_Loaded(object sender, RoutedEventArgs e) { EmployeeFactory EFobj = new EmployeeFactory(); Employee_Table ETobj = EFobj.GetAllByName(EmployeeId); _vm = new EmployeeViewModel(); _vm.E_Name = ETobj.E_Name; _vm.E_Address = ETobj.E_Address; _vm.E_Desg = ETobj.E_Desg; _vm.E_Phone = ETobj.E_Phone; _vm.E_Salary = ETobj.E_Salary; this.DataContext = _vm; }