public void t_Person_Save_Insert()
        {
            Person Person = new Person()
            {
                Id           = TestHelper.TestGuid1,
                FirstName    = "First Name",
                LastName     = "Last Name",
                EmailAddress = "asdf@adfasd",
                PhoneNumber  = "(651) 646-8007"
            };

            PersonMapper.Insert(Person);


            using (IbaUnitTestEntities iba = new IbaUnitTestEntities())
            {
                var PersonQuery = from Persons in iba.Person_ado select Persons;
                Assert.IsNotNull(PersonQuery, "Query result is null");
                Assert.AreEqual(1, PersonQuery.Count(), "Wrong number of results in query");
                Person_ado adoPerson = PersonQuery.First();
                validateObjectEquality(Person, adoPerson);
            }
        }
Esempio n. 2
0
 public static void Insert(Person newPerson)
 {
     PersonMapper.Insert(newPerson);
 }