// testing purpose: Get value from two different table
        public ReadTwoTableDataConcurrently GetAllValueFromDifferentTableViaDataAdapter()
        {
            ReadTwoTableDataConcurrently newDataFromTwoTable;

            string         query       = "select * from Employee; select * from EmpTags";
            SqlConnection  co          = new SqlConnection(Configuration.GetConnectionString("KspStoreDBCon"));
            SqlDataAdapter dataAdapter = new SqlDataAdapter(query, co);
            DataSet        dataSet     = new DataSet();

            dataAdapter.Fill(dataSet);
            dataSet.Tables[0].TableName = "Emp";
            dataSet.Tables[1].TableName = "Tags";

            List <Employee> employees = new List <Employee>();

            // read first table data
            foreach (DataRow em in dataSet.Tables["Emp"].Rows)
            {
                var emp = new Employee
                {
                    Id       = (int)em["Id"],
                    Name     = em["Name"].ToString(),
                    UserName = em["UserName"].ToString(),
                    Address  = em["Address"].ToString(),
                    Email    = em["Email"].ToString()
                };
                employees.Add(emp);
            }


            List <NewClass> secondData = new List <NewClass>();

            //read second table data
            foreach (DataRow em in dataSet.Tables["Tags"].Rows)
            {
                var ob = new NewClass
                {
                    Id           = (int)em["Id"],
                    CategoryName = em["CategoryName"].ToString()
                };
                secondData.Add(ob);
            }

            newDataFromTwoTable = new ReadTwoTableDataConcurrently
            {
                Employees  = employees,
                NewClasses = secondData
            };



            return(newDataFromTwoTable);
        }
        //testing purpose
        public ReadTwoTableDataConcurrently GetAllValueFromDifferentTable()
        {
            ReadTwoTableDataConcurrently newDataFromTwoTable;

            try
            {
                string query = "select * from Employee; select * from EmpTags";
                cmd.CommandText = query;
                con.Open();
                SqlDataReader   reader    = cmd.ExecuteReader();
                List <Employee> employees = new List <Employee>();
                // read first table data
                while (reader.Read())
                {
                    var emp = new Employee
                    {
                        Id       = (int)reader["Id"],
                        Name     = reader["Name"].ToString(),
                        UserName = reader["UserName"].ToString(),
                        Address  = reader["Address"].ToString(),
                        Email    = reader["Email"].ToString()
                    };
                    employees.Add(emp);
                }

                // testing purpose: Get value from two different table
                List <NewClass> secondData = new List <NewClass>();
                reader.NextResult();
                while (reader.Read())
                {
                    var data = new NewClass
                    {
                        Id           = (int)reader["Id"],
                        CategoryName = reader["CategoryName"].ToString()
                    };
                    secondData.Add(data);
                }

                newDataFromTwoTable = new ReadTwoTableDataConcurrently
                {
                    Employees  = employees,
                    NewClasses = secondData
                };
                reader.Close();
            }
            finally
            {
                con.Close();
            }
            return(newDataFromTwoTable);
        }