SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=myDB;Integrated Security=true;"); SqlDataAdapter adaptor = new SqlDataAdapter("SELECT ID,Name,Surname,JobTitle FROM tblEmployees;", con); DataTable dt = new DataTable(); adaptor.Fill(dt);
public ObservableCollection<tblEmployee> GetEmployees() { EmployeesEntities Context = new EmployeesEntities(); Context.tblEmployees.Load(); return Context.tblEmployees.Local; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)