public List<Entity> SelectAll() { Business bb = new Business(); return bb.SelectEmployee(); //return getemp.ToList(); }
public List<Entity> getEmployee() { //List<Employee> EMP = new List<Employee>(); //con.Open(); //SqlCommand cmd; //string str = "Select * From Emp"; //cmd = new SqlCommand(str, con); //SqlDataReader rdr = cmd.ExecuteReader(); //while (rdr.Read()) //{ // Employee empdata = new Employee(); // empdata.Employeeid = Convert.ToInt32(rdr["Employeeid"]); // empdata.Firstname = Convert.ToString(rdr["Firstname"]); // empdata.Lastname = Convert.ToString(rdr["Lastname"]); // empdata.Birthdate = Convert.ToString(rdr["Birthdate"]); // empdata.Sex = Convert.ToString(rdr["Sex"]); // EMP.Add(empdata); //} //con.Close(); Business bl = new Business(); return bl.SelectEmployee().ToList(); //return EMP.ToList(); }