using (NestedUnitOfWork restore = session.BeginNestedUnitOfWork())
{
ICollection delCol = restore.GetObjects(restore.GetClassInfo<YourTable>(),
new OperandProperty("GCRecord").IsNotNull(), null, 0, true, true);
if (delCol != null && delCol.Count != 0)
{
foreach (YourTable yourTable in delCol)
{
yourTable.SetMemberValue("GCRecord", null);
}
restore.CommitChanges();
}
}
No comments:
Post a Comment