Example #1
0
 public void DeleteApplicationOperation(zAppDev.DotNet.Framework.Identity.Model.ApplicationOperation applicationoperation, bool doNotCallDeleteForThis = false, bool isCascaded = false, object calledBy = null)
 {
     if (applicationoperation == null || applicationoperation.IsTransient())
     {
         return;
     }
     if (applicationoperation.Permissions.Count > 0)
     {
         var cs = new System.Data.ConstraintException("applicationoperation.Permissions elements are restricted and cannot be deleted");
         cs.Data["Entity"]       = "ApplicationOperation";
         cs.Data["PropertyName"] = "Permissions";
         cs.Data["Multiplicity"] = "*";
         throw cs;
     }
     if (!doNotCallDeleteForThis)
     {
         Delete <zAppDev.DotNet.Framework.Identity.Model.ApplicationOperation>(applicationoperation, isCascaded);
     }
 }
/// <summary>
///     Returns true if self and the provided entity have the same Id values
///     and the Ids are not of the default Id value
/// </summary>
        protected bool HasSameNonDefaultIdAs(ApplicationOperation compareTo)
        {
            return(!this.IsTransient() && !compareTo.IsTransient() && this.Id.Equals(compareTo.Id));
        }