protected EntityBase(IDistinctableEntity distinctableEntity) { if (distinctableEntity == null) { Id = NullId; return; } Id = (long)distinctableEntity.GetPkValue(); }
private static void CheckIsConsistant(IDistinctableEntity book, ReferenceHolder <Book, long?> manadatory) { Assert.AreEqual(book, manadatory.Object); Assert.AreEqual(book.GetPkValue(), manadatory.Id); }