示例#1
0
        protected EntityBase(IDistinctableEntity distinctableEntity)
        {
            if (distinctableEntity == null)
            {
                Id = NullId;
                return;
            }

            Id = distinctableEntity.Id;
        }
示例#2
0
文件: EntityBase.cs 项目: sGeeK44/Orm
        protected EntityBase(IDistinctableEntity distinctableEntity)
        {
            if (distinctableEntity == null)
            {
                Id = NullId;
                return;
            }

            Id = (long)distinctableEntity.GetPkValue();
        }
示例#3
0
 private static void CheckIsConsistant(IDistinctableEntity book, ReferenceHolder <Book, long?> manadatory)
 {
     Assert.AreEqual(book, manadatory.Object);
     Assert.AreEqual(book.GetPkValue(), manadatory.Id);
 }
 private static void CheckIsConsistant(IDistinctableEntity book, NullableReferenceHolder <Book> manadatory)
 {
     Assert.AreEqual(book, manadatory.Object);
     Assert.AreEqual(book.Id, manadatory.Id);
 }