public void Init2() { namingTestColl = new NamingTestCollection(); namingTest = new NamingTest(); // The table Naming.Test has a 'dot' in it, // so that is being tested as well. switch (namingTestColl.es.Connection.ProviderSignature.DataProviderName) { case "EntitySpaces.SqlClientProvider": namingTestColl.LoadAll(); namingTestColl.MarkAllAsDeleted(); namingTestColl.Save(); break; default: break; } }
public void GuidDynamicQuery() { NamingTestCollection namingTestColl = new NamingTestCollection(); NamingTest namingTest = new NamingTest(); switch (namingTestColl.es.Connection.ProviderSignature.DataProviderName) { case "EntitySpaces.SqlClientProvider": namingTest.Save(); Guid? tempKey = namingTest.GuidKeyAlias; namingTestColl.Query.Where(namingTestColl.Query.GuidKeyAlias == tempKey); namingTestColl.Query.Load(); Assert.AreEqual(1, namingTestColl.Count); Assert.IsTrue(namingTest.LoadByPrimaryKey(tempKey.Value)); namingTest.MarkAsDeleted(); namingTest.Save(); break; default: Assert.Ignore("Sql Server only"); break; } }
public void SetGuidPrimaryKey() { NamingTestCollection namingTestColl = new NamingTestCollection(); NamingTest namingTest = new NamingTest(); switch (namingTestColl.es.Connection.ProviderSignature.DataProviderName) { case "EntitySpaces.SqlClientProvider": string testGuid = "b3883c65-ff94-47c4-8b0c-76896bedd45a"; namingTest.GuidKeyAlias = new Guid(testGuid); namingTest.Save(); Guid? tempKey = namingTest.GuidKeyAlias; namingTest.MarkAsDeleted(); namingTest.Save(); Assert.AreEqual(testGuid, tempKey.Value.ToString()); break; default: Assert.Ignore("Sql Server only"); break; } }