Exemplo n.º 1
0
		protected static string test04() {
			AltairStudios.Core.ConsoleTests.Models.TestModel test = new AltairStudios.Core.ConsoleTests.Models.TestModel();
			
			test.Name = "testname";
			test.PasswordMd5 = "password";
			test.PasswordSha1 = "password";
			
			test.IntList = new AltairStudios.Core.Orm.ModelList<int>();
			test.IntList.Add(1);
			test.IntList.Add(2);
			
			test.UserList = new AltairStudios.Core.Orm.ModelList<AltairStudios.Core.Orm.Models.User>();
			AltairStudios.Core.Orm.Models.User user = new AltairStudios.Core.Orm.Models.User();
			user.Email = "*****@*****.**";
			user.Name = "test";
			user.Surname = "surtest";
			test.UserList.Add(user);
			
			test.Address = new AltairStudios.Core.Orm.Models.Address();
			test.Address.Street = "Sesame street";
			
			return AltairStudios.Core.Orm.Providers.SqlProvider.getProvider("MySql.Data.MySqlClient").sqlInsert(test.GetType());
		}
Exemplo n.º 2
0
		protected static string test06() {
			Models.TestModel test = new Models.TestModel();
			
			test.Id = 5;
			test.PasswordMd5 = "1234";
			test.PasswordSha1 = "1234";
			
			test.IntList = new AltairStudios.Core.Orm.ModelList<int>();
			test.IntList.Add(5);
			test.IntList.Add(7);
			test.IntList.Add(8);
			test.IntList.Add(3);
			
			test.UserList = new AltairStudios.Core.Orm.ModelList<AltairStudios.Core.Orm.Models.User>();
			
			AltairStudios.Core.Orm.Models.User userA = new AltairStudios.Core.Orm.Models.User();
			userA.Name = "Test";
			userA.Surname = "Test";
			userA.Email = "*****@*****.**";
			userA.Password = "******";
			test.UserList.Add(userA);
			
			return test.ToJson();
		}