public void runTest()
        {
            Stopwatch linqStopWatch = new Stopwatch();
            linqStopWatch.Start();

            GreaterThanOrEqual gOrEqual = new GreaterThanOrEqual();
            List<GreaterThanOrEqual_Result> linqResults = gOrEqual.GreaterThanOrEqual_Method(DateTime.Now);
            linqStopWatch.Stop();

            Stopwatch efStopW = new Stopwatch();
            efStopW.Start();

            var context = new AWorksLTEntities();
            List<GreaterThanOrEqual_Result> efResults = new List<GreaterThanOrEqual_Result>();

            foreach (GreaterThanOrEqual_Result g in context.GreaterThanOrEqual(DateTime.Now))
            {
                efResults.Add(g);
            }
            efStopW.Stop();

            if (linqResults.Count == efResults.Count)
            {
                writeToFile(linqResults, efResults, linqStopWatch, efStopW);
            }
        }
        public void runTest()
        {
            //Create a stopwatch
            Stopwatch linqStopWatch = new Stopwatch();
            linqStopWatch.Start();

            WhereBetweenValues whereBetween = new WhereBetweenValues();
            List<WhereBetweenValues_Result> linqSubset = whereBetween.WhereBetweenValues_Method(680, 713);

            linqStopWatch.Stop();

            Stopwatch efStopWatch = new Stopwatch();
            efStopWatch.Start();

            var context = new AWorksLTEntities();
            List<WhereBetweenValues_Result> efWhereBetween = new List<WhereBetweenValues_Result>();

            foreach (WhereBetweenValues_Result w in context.WhereBetweenValues(680, 713))
            {
                efWhereBetween.Add(w);
            }
            efStopWatch.Stop();

            if (linqSubset.Count() == efWhereBetween.Count())
            {
                writeToFile(linqSubset, efWhereBetween, linqStopWatch, efStopWatch);
            }
        }
        public void runTest()
        {
            // Call the generated Linq method and count
            Stopwatch linqstopwatch = new Stopwatch();
            linqstopwatch.Start();
            SelectDistinct selectdistinct = new SelectDistinct();
            List<SelectDistinct_Result> distinctList = selectdistinct.SelectDistinct_Method();
            linqstopwatch.Stop();

            // Call via the Stored Procedures
            Stopwatch efstopwatch = new Stopwatch();
            efstopwatch.Start();
            var context = new AWorksLTEntities();
            List<SelectDistinct_Result> sdResultList = new List<SelectDistinct_Result>();
            foreach (SelectDistinct_Result sdRes in context.SelectDistinct())
            {
                sdResultList.Add(sdRes);
            }
            efstopwatch.Stop();

            if (distinctList.Count() == sdResultList.Count())
            {
                writeToFile(distinctList, sdResultList, linqstopwatch, efstopwatch);

            }
        }
        public void runTest()
        {
            Stopwatch linqStopWatch = new Stopwatch();
            linqStopWatch.Start();

            InnerJoinWhereMethod inJoinMethod = new InnerJoinWhereMethod();
            List<InnerJoinWhereMethod_Result> linqResults = inJoinMethod.InnerJoinWhereMethod_Method();

            linqStopWatch.Stop();

            Stopwatch efStopWatch = new Stopwatch();
            efStopWatch.Start();

            var context = new AWorksLTEntities();
            List<InnerJoinWhereMethod_Result> efResults = new List<InnerJoinWhereMethod_Result>();

            foreach (InnerJoinWhereMethod_Result i in context.InnerJoinWhereMethod())
            {
                efResults.Add(i);
            }
            efStopWatch.Stop();

            if (linqResults.Count == efResults.Count)
            {
                writeToFile(linqResults, efResults, linqStopWatch, efStopWatch);
            }
        }
        public void runTest()
        {
            Stopwatch linqStopWatch = new Stopwatch();
            linqStopWatch.Start();

            WhereComparisonOperator whereCompOp = new WhereComparisonOperator();
            List<WhereComparisonOperator_Result> linqresult = whereCompOp.WhereComparisonOperator_Method("LL Road Frame - Red, 52", 2);

            linqStopWatch.Stop();

            Stopwatch efStopWatch = new Stopwatch();
            efStopWatch.Start();

            var context = new AWorksLTEntities();
            List<WhereComparisonOperator_Result> efWhereCompArg = new List<WhereComparisonOperator_Result>();

            foreach (WhereComparisonOperator_Result w in context.WhereComparisonOperator("LL Road Frame - Red, 52", 2))
            {
                efWhereCompArg.Add(w);
            }

            efStopWatch.Stop();

            if (linqresult.Count() == efWhereCompArg.Count())
            {
                writeToFile(linqresult, efWhereCompArg, linqStopWatch, efStopWatch);
            }
        }
        public void runTest()
        {
            Stopwatch linqStopWatch = new Stopwatch();
            linqStopWatch.Start();

            WhereClauseOneArgument whereOneArg = new WhereClauseOneArgument();
            List<WhereClauseOneArgument_Result> linqresult = whereOneArg.WhereClauseOneArgument_Method("LL Road Frame - Red, 52", "red");

            linqStopWatch.Stop();

            Stopwatch efStopWatch = new Stopwatch();
            efStopWatch.Start();

            var context = new AWorksLTEntities();
            List<WhereClauseOneArgument_Result> efWhereOneArg = new List<WhereClauseOneArgument_Result>();

            foreach (WhereClauseOneArgument_Result w in context.WhereClauseOneArgument("LL Road Frame - Red, 52", "red"))
            {
                efWhereOneArg.Add(w);
            }

            efStopWatch.Stop();

            if (linqresult.Count() == efWhereOneArg.Count())
            {
                writeToFile(linqresult, efWhereOneArg, linqStopWatch, efStopWatch);
            }
        }
        public void runTest()
        {
            Stopwatch linqStopWatch = new Stopwatch();
            linqStopWatch.Start();

            WhereSeveralConditions whSevCond = new WhereSeveralConditions();
            List<WhereSeveralConditions_Result> linqResults = whSevCond.WhereSeveralConditions_Method("p", "red");

            linqStopWatch.Stop();

            Stopwatch efStopWatch = new Stopwatch();
            efStopWatch.Start();

            var context = new AWorksLTEntities();
            List<WhereSeveralConditions_Result> efResults = new List<WhereSeveralConditions_Result>();

            foreach (WhereSeveralConditions_Result w in context.WhereSeveralConditions("p", "red"))
            {
                efResults.Add(w);
            }

            efStopWatch.Stop();

            if (linqResults.Count() == efResults.Count())
            {
                writeToFile(linqResults, efResults, linqStopWatch, efStopWatch);
            }
        }
        public void runTest()
        {
            //Create a stopwatch
            Stopwatch linqStopWatch = new Stopwatch();
            linqStopWatch.Start();

            SelectSubset selectSubset = new SelectSubset();
            List<SelectSubset_Result> linqSubset = selectSubset.SelectSubset_Method();

            linqStopWatch.Stop();

            Stopwatch efStopWatch = new Stopwatch();
            efStopWatch.Start();

            var context = new AWorksLTEntities();
            List<SelectSubset_Result> efSubset = new List<SelectSubset_Result>();
            foreach (SelectSubset_Result sR in context.SelectSubset())
            {
                efSubset.Add(sR);
            }

            efStopWatch.Stop();

            if (linqSubset.Count() == efSubset.Count())
            {
                writeToFile(linqSubset, efSubset, linqStopWatch, efStopWatch);
            }
        }
        public void runTest()
        {
            //Create a stopwatch
            Stopwatch linqStopWatch = new Stopwatch();
            linqStopWatch.Start();

            // Call the linq method
            SelectMultipleDistinct selectMultipleD = new SelectMultipleDistinct();
            List<SelectMultipleDistinct_Result> multiplelist = selectMultipleD.SelectMultipleDistinct_Method();

            linqStopWatch.Stop();

            Stopwatch efStopWatch = new Stopwatch();
            efStopWatch.Start();

            var context = new AWorksLTEntities();
            List<SelectMultipleDistinct_Result> multipleResults = new List<SelectMultipleDistinct_Result>();
            foreach (SelectMultipleDistinct_Result mdr in context.SelectMultipleDistinct())
            {
                multipleResults.Add(mdr);
            }
            efStopWatch.Stop();

            if (multiplelist.Count() == multipleResults.Count())
            {
                writeToFile(multiplelist, multipleResults, linqStopWatch, efStopWatch);
            }
        }
        public void runTest()
        {
            Stopwatch linqStopWatch = new Stopwatch();
            linqStopWatch.Start();

            WhereLikeString whereLikeString = new WhereLikeString();
            List<WhereLikeString_Result> linqResults = whereLikeString.WhereLikeString_Method("LL Road Frame - Red, 52");

            linqStopWatch.Stop();

            Stopwatch efStopWatch = new Stopwatch();
            efStopWatch.Start();

            var context = new AWorksLTEntities();
            List<WhereLikeString_Result> efLikeString = new List<WhereLikeString_Result>();

            foreach (WhereLikeString_Result w in context.WhereLikeString("LL Road Frame - Red, 52"))
            {
                efLikeString.Add(w);
            }

            efStopWatch.Stop();

            if (linqResults.Count() == efLikeString.Count())
            {
                writeToFile(linqResults, efLikeString, linqStopWatch, efStopWatch);
            }
        }
        public void runTest()
        {
            Stopwatch linqStopWatch = new Stopwatch();
            linqStopWatch.Start();
            CInnerJoin cInnerJoin = new CInnerJoin();
            List<CInnerJoin_Result> cJoinList = cInnerJoin.CInnerJoin_Method();
            linqStopWatch.Stop();

            Stopwatch efStopWatch = new Stopwatch();
            efStopWatch.Start();
            var context = new AWorksLTEntities();
            List<CInnerJoin_Result> cInnerJoinList = new List<CInnerJoin_Result>();
            foreach (CInnerJoin_Result c in context.CInnerJoin())
            {
                cInnerJoinList.Add(c);
            }
            efStopWatch.Stop();

            if (cJoinList.Count() == cInnerJoinList.Count())
            {
                writeToFile(cJoinList, cInnerJoinList, linqStopWatch, efStopWatch);
            }
        }
        public void runTest()
        {
            Stopwatch linqStopWatch = new Stopwatch();
            linqStopWatch.Start();
            WhereSimpleEquality wSimpleE = new WhereSimpleEquality();
            List<WhereSimpleEquality_Result> linqResult = wSimpleE.WhereSimpleEquality_Method();
            linqStopWatch.Stop();

            Stopwatch efStopWatch = new Stopwatch();
            efStopWatch.Start();
            var context = new AWorksLTEntities();
            List<WhereSimpleEquality_Result> efResults = new List<WhereSimpleEquality_Result>();
            foreach (WhereSimpleEquality_Result w in context.WhereSimpleEquality())
            {
                efResults.Add(w);
            }
            efStopWatch.Stop();

            if (linqResult.Count == efResults.Count)
            {
                writeToFile(linqResult, efResults, linqStopWatch, efStopWatch);
            }
        }
        public void runTest()
        {
            Stopwatch linqStopWatch = new Stopwatch();
            linqStopWatch.Start();
            WhereEqualsString wEqualString = new WhereEqualsString();
            List<WhereEqualsString_Result> linqResults = wEqualString.WhereEqualsString_Method();
            linqStopWatch.Stop();

            Stopwatch efStopW = new Stopwatch();
            efStopW.Start();
            var context = new AWorksLTEntities();
            List<WhereEqualsString_Result> efResults = new List<WhereEqualsString_Result>();
            foreach(WhereEqualsString_Result w in context.WhereEqualsString())
            {
                efResults.Add(w);
            }
            efStopW.Stop();

            if (linqResults.Count == efResults.Count)
            {
                writeToFile(linqResults, efResults, linqStopWatch, efStopW);
            }
        }
        public void runTest()
        {
            Stopwatch linqStopWatch = new Stopwatch();
            linqStopWatch.Start();
            SelectAll selectAll = new SelectAll();
            List<SelectAll_Result> selectAllList = selectAll.SelectAll_Method();
            linqStopWatch.Stop();

            Stopwatch efStopWatch = new Stopwatch();
            efStopWatch.Start();
            var context = new AWorksLTEntities();
            List<SelectAll_Result> efSelectAllList = new List<SelectAll_Result>();
            foreach (SelectAll_Result s in context.SelectAll())
            {
                efSelectAllList.Add(s);
            }
            efStopWatch.Stop();

            if (selectAllList.Count() == efSelectAllList.Count())
            {
                writeToFile(selectAllList, efSelectAllList, linqStopWatch, efStopWatch);
            }
        }
        public void runTest()
        {
            Stopwatch linqStopWatch = new Stopwatch();
            linqStopWatch.Start();
            SelectWhereNoParams whereNoParam = new SelectWhereNoParams();
            List<SelectWhereNoParams_Result> linqResults = whereNoParam.SelectWhereNoParams_Method();
            linqStopWatch.Stop();

            Stopwatch efStopWatch = new Stopwatch();
            efStopWatch.Start();
            var context = new AWorksLTEntities();
            List<SelectWhereNoParams_Result> efResults = new List<SelectWhereNoParams_Result>();
            foreach (SelectWhereNoParams_Result s in context.SelectWhereNoParams())
            {
                efResults.Add(s);
            }
            efStopWatch.Stop();

            if (linqResults.Count == efResults.Count)
            {
                writeToFile(linqResults, efResults, linqStopWatch, efStopWatch);
            }
        }
 /// <summary>
 /// This method finds all the associated properties of an object
 /// Then using reflection obtains the type of the property
 /// Then calls the method GetCoreType to fine the underlying type if the type is returned as Nullable.
 /// </summary>
 /// <param name="list">A list of Tokens </param>
 /// <returns>The list of tokens with the dataType property completed</returns>
 public static List<Token> gDataType(List<Token> list)
 {
     DataBaseLayer.AWorksLTEntities db = new AWorksLTEntities();
     DataBaseLayer.Product product = new DataBaseLayer.Product();
     foreach (var t in list)
     {
         if (t.Sql == "param")
         {
             foreach (var prop in product.GetType().GetProperties())
             {
                 var proptype = prop.PropertyType;
                 var coretype = GetCoreType(proptype).Name;
             }
         }
     }
     return list;
 }