Exemple #1
0
		public void SetValueTest()
		{
			using (DbManager db = new DbManager())
			{
				db.SetCommand("SELECT @par * 2",
					db./*[a]*/Parameter/*[/a]*/("@par", DbType.Int32));

				db./*[a]*/Parameter("@par").Value/*[/a]*/ = 2;

				Assert.AreEqual(4, db.ExecuteScalar<int>());
			}
		}
        protected void Application_Start()
        {
            typeof(MvcApplication).Info("Application");

            CDRManager.PrepareServers();
            CDRManager.Update();

            using (var db =
                new DbManager(ConfigurationManager.AppSettings["DbProvider"], string.Empty))
            {
                db.SetCommand("SELECT 1");
                int i = db.ExecuteScalar<int>();
                Debug.Write(i);
            }

            Country c = GeoManager.Instance.GetCountryByIp("194.135.115.89");

            AreaRegistration.RegisterAllAreas();

            WebApiConfig.Register(GlobalConfiguration.Configuration);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
        }