using e_suite.Database.Core.Models;
using eSuite.Core.Miscellaneous;

namespace e_suite.Database.Core.Extensions;

public static class GeneralIdExtensions
{
    public static bool IsMatch( this IGeneralId generalId, IGeneralIdRef generalIdRef)
    {
        if ((generalIdRef.Id != null) && (generalId.Id == generalIdRef.Id))
            return true;

        if ((generalIdRef.Guid != null) && (generalId.Guid == generalIdRef.Guid))
            return true;

        return false;
    }
}