Example #1
0
        public void Test_Get_Database_Type_EmptyConnection()
        {
            var command      = new SqlCommand();
            var databaseType = EFUtil.GetDataBaseType(command);

            Assert.AreEqual("entityframework", databaseType); // Empty connection will return entityframework by default.
        }
Example #2
0
        public void Test_Get_Database_Type_SqlServer()
        {
            var connection   = new SqlConnection();
            var command      = new SqlCommand(null, connection);
            var databaseType = EFUtil.GetDataBaseType(command);

            Assert.AreEqual("sqlserver", databaseType);
        }