예제 #1
0
        public bool GetSingleColumnParam(Stopwatch watch, int repeatCount, int takeCount)
        {
            watch.Start();

            using (var db = new L2SContext(TrackChanges))
                for (var i = 0; i < repeatCount; i++)
                {
                    db.ExecuteQuery <int>("SELECT ID FROM Narrow WHERE ID = {0} AND Field1 = {1}", 1, 2);
                }

            watch.Stop();

            return(true);
        }
예제 #2
0
        public bool GetSingleColumnSlow(Stopwatch watch, int repeatCount, int takeCount)
        {
            watch.Start();

            for (var i = 0; i < repeatCount; i++)
            {
                using (var db = new L2SContext(TrackChanges))
                    db.ExecuteQuery <int>(GetSingleColumnSql);
            }

            watch.Stop();

            return(true);
        }
예제 #3
0
        public bool GetWideList(Stopwatch watch, int repeatCount, int takeCount)
        {
            var sql = GetWideListSql(takeCount);

            watch.Start();

            for (var i = 0; i < repeatCount; i++)
            {
                using (var db = new L2SContext(TrackChanges))
                    foreach (var item in db.ExecuteQuery <WideLong>(sql))
                    {
                    }
            }

            watch.Stop();

            return(true);
        }