Esempio n. 1
0
 public SizeDTO ToSimpleDto(Size s)
 {
     return new SizeDTO
     {
         SizeID = s.SizeID,
         SizeValue = s.SizeValue
     };
 }
Esempio n. 2
0
        public void Size_PersistanceTest()
        {
            var compare = new CompareObjects();
            compare.IgnoreObjectTypes = true;

            InAutoRollbackTransaction(uof =>
            {
                Size s = new Size { SizeValue = Size.MEDIUM };
                int x = ((List<Size>)uof.Db.Sizes.FindAll()).Count;

                uof.Db.Sizes.Insert(s);
                uof.Db.Commit();
                uof.Db.ObjectContext().DetachAll();

                int y = ((List<Size>)uof.Db.Sizes.FindAll()).Count;

                Assert.IsTrue(y == x + 1);
            });
        }