public EmployeePhoneList GetByEmployeId(Guid id) { Database database = new Database("Employer"); database.Command.Parameters.Clear(); database.Command.CommandType = System.Data.CommandType.StoredProcedure; database.Command.CommandText = "tblEmployeePhoneGetByEmployeeId"; database.Command.Parameters.Add("@EmployeeId", SqlDbType.UniqueIdentifier).Value = id; DataTable dt = database.ExecuteQuery(); foreach (DataRow dr in dt.Rows) { EmployeePhone employeePhone = new EmployeePhone(); employeePhone.Initialize(dr); employeePhone.InitializeBusinessData(dr); employeePhone.IsNew = false; employeePhone.IsDirty = false; employeePhone.Savable += EmployeePhone_Savable; _List.Add(employeePhone); } return(this); }