本文整理匯總了C#中System.TestClass.Save方法的典型用法代碼示例。如果您正苦於以下問題:C# TestClass.Save方法的具體用法?C# TestClass.Save怎麽用?C# TestClass.Save使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.TestClass
的用法示例。
在下文中一共展示了TestClass.Save方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Application_Start
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
RouteConfig.RegisterRoutes(RouteTable.Routes);
if (TestClass.Any() != null)
return;
for (int x = 0; x < 5; ++x)
{
var TempObject = new TestClass();
TempObject.BoolReference = true;
TempObject.ByteArrayReference = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
TempObject.ByteReference = 12;
TempObject.CharReference = 'v';
TempObject.DecimalReference = 1.4213m;
TempObject.DoubleReference = 1.32645d;
TempObject.EnumReference = TestEnum.Value2;
TempObject.FloatReference = 1234.5f;
TempObject.GuidReference = Guid.NewGuid();
TempObject.IntReference = 145145;
TempObject.LongReference = 763421;
//TempObject.ManyToManyIEnumerable = new TestClass[] { new TestClass(), new TestClass() };
//TempObject.ManyToManyList = new TestClass[] { new TestClass(), new TestClass(), new TestClass() }.ToList();
//TempObject.ManyToOneIEnumerable = new TestClass[] { new TestClass(), new TestClass(), new TestClass() };
//TempObject.ManyToOneItem = new TestClass();
//TempObject.ManyToOneList = new TestClass[] { new TestClass(), new TestClass(), new TestClass() }.ToList();
//TempObject.Map = new TestClass();
TempObject.NullStringReference = null;
TempObject.ShortReference = 5423;
TempObject.StringReference = "agsdpghasdg";
TempObject.Save();
}
}