public static IDbObject GetObject(this ISession session, DbObjectType objectType, ObjectName objectName, AccessType accessType) { var obj = session.Transaction.GetObject(objectType, objectName); if (obj != null) { session.Access(obj, accessType); } return(obj); }
public static void Access(this ISession session, IDbObject obj, AccessType accessType) { session.Access(new [] { obj }, accessType); }