本文整理匯總了C#中NHibernate.Cfg.MappingSchema.HbmManyToOne.CanBeNull方法的典型用法代碼示例。如果您正苦於以下問題:C# HbmManyToOne.CanBeNull方法的具體用法?C# HbmManyToOne.CanBeNull怎麽用?C# HbmManyToOne.CanBeNull使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類NHibernate.Cfg.MappingSchema.HbmManyToOne
的用法示例。
在下文中一共展示了HbmManyToOne.CanBeNull方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Should_get_exception_given_notnullSpecified_is_false_and_Items_is_null
public void Should_get_exception_given_notnullSpecified_is_false_and_Items_is_null()
{
HbmManyToOne manyToOne = new HbmManyToOne
{
notnullSpecified = false,
Items = null
};
bool? result = manyToOne.CanBeNull();
result.ShouldBeNull();
}
示例2: Should_get__false__given_notnullSpecified_and_notnull_are_both_true
public void Should_get__false__given_notnullSpecified_and_notnull_are_both_true()
{
HbmManyToOne manyToOne = new HbmManyToOne
{
notnullSpecified = true,
notnull = true
};
bool? result = manyToOne.CanBeNull();
result.ShouldNotBeNull();
result.Value.ShouldBeFalse();
}
示例3: Should_get_null_given_notnullSpecified_is_false_and_Items_notnullSpecified_is_false
public void Should_get_null_given_notnullSpecified_is_false_and_Items_notnullSpecified_is_false()
{
HbmManyToOne manyToOne = new HbmManyToOne
{
notnullSpecified = false,
Items = new object[]
{
new HbmColumn
{
notnullSpecified = false
}
}
};
bool? result = manyToOne.CanBeNull();
result.ShouldBeNull();
}