コード例 #1
0
        internal VaultKeep DeleteOne(int id, string userInfoId)
        {
            VaultKeep current = _vkrepo.GetOneById(id);

            if (current == null)
            {
                throw new SystemException("Invalid Id: This vault keep does not exist or the wrong Id was passed in the delete request.");
            }
            if (current.CreatorId != userInfoId)
            {
                throw new SystemException("You are not the creator of this, therefore you can not delete this relationsip.");
            }
            _vkrepo.DeleteOne(id);
            return(current);
        }