static void Main(string[] args) { int n = 200000; for (int i = 0; i < cycles; i++) { BytePacket p = new BytePacket(40000); BytePacket p2 = new BytePacket(40000); Boh value = Boh.Item1 | Boh.Item10 | Boh.Item11; watch.Reset(); watch.Start(); bool res = false; bool res1 = false; bool res2 = false; for (int z = 0; z < n; z++) { } watch.Stop(); long time = watch.ElapsedTicks; d1 += time; c1++; float f = 5f; float a; watch.Reset(); watch.Start(); for (int z = 0; z < n; z++) { } watch.Stop(); long time2 = watch.ElapsedTicks; d2 += time2; c2++; if (time > time2) { False++; } else { True++; } AverageFirst = d1 / c1; AverageSecond = d2 / c2; Console.WriteLine("Avrg first : {0} , win frames : {1} . Avrg second : {2} , win frames : {3}", AverageFirst, True, AverageSecond, False); } Console.WriteLine("End"); Console.ReadLine(); }
public ActionResult Dashboard() { int userId = User.Identity.GetUserId <int>(); using (var dbContext = new MazzaDbContext()) { Boh model = new Boh { InvestmentReports = dbContext.Database .SqlQuery <InvestmentReport>(string.Format("CALL spREP_InvestmentReport ({0})", userId)) .ToList(), AffiliateLists = dbContext.Database .SqlQuery <AffiliateList>(string.Format("CALL spREP_GetAffiliate ({0})", userId)) .ToList() }; return(Request.IsAuthenticated && model != null?View(model) : (ActionResult)RedirectToAction("Login", "Account")); } }