Пример #1
0
        /// <summary>
        /// Inserts an ACL per object entry
        /// </summary>
        /// <param name="aclPerObject">ACL per object entry</param>
        public void InsertAclPerObject(ACLPerObject aclPerObject)
        {
            if (aclPerObject == null)
            {
                throw new ArgumentNullException("aclPerObject");
            }



            _context.ACLPerObject.AddObject(aclPerObject);
            _context.SaveChanges();
        }
Пример #2
0
        /// <summary>
        /// Updates the ACL per object entry
        /// </summary>
        /// <param name="aclPerObject">ACL per object entry</param>
        public void UpdateAclPerObject(ACLPerObject aclPerObject)
        {
            if (aclPerObject == null)
            {
                throw new ArgumentNullException("aclPerObject");
            }


            if (!_context.IsAttached(aclPerObject))
            {
                _context.ACLPerObject.Attach(aclPerObject);
            }

            _context.SaveChanges();
        }