CompareHelper.cs 724 B

1234567891011121314151617181920
  1. using Aip.Service.Aip.Models;
  2. using Aip.Service.Entities;
  3. namespace Aip.Service.Aip.Helpers;
  4. public static class CompareHelper
  5. {
  6. public static bool IsChanged(this TbAipLabel aipLabel, AipLabel label)
  7. {
  8. return (aipLabel.LabelName != label.Name) || (aipLabel.LabelDesc != label.Description);
  9. }
  10. public static bool IsChanged(this TbAipPolicy aipPolicy, AipLabel label)
  11. {
  12. return (aipPolicy.PolicyName != label.Name) || (aipPolicy.PolicyDesc != label.Description);
  13. }
  14. public static bool IsChanged(this TbAipProtection aipProtection, AipTemplate label)
  15. {
  16. return (aipProtection.ProtectionName != label.Name) || (aipProtection.ProtectionDesc != label.Description);
  17. }
  18. }