mardi 23 octobre 2018

How can I access the payment date field which is inside 'paid' class in Linq

There is a field called factor statebase which we implemented using pattern strategy. This field has a default value of pendingfactorstate. We wish to access all factors that in paid state and their dates fall within a specific time interval. This payment time interval is 'new'ed inside the paidfactorstate when the payment is actually done and the new class is assigned to the state field.

My question is how can I access the payment date field which is inside 'paid' class in Linq?

Thank you,

public Factor(long id)
{
    Id = id;

    FactorStateBase = new PendingFactorState(Guid.NewGuid());
}

public void PayFactor(Guid id, string messageNumber, Guid paymentId, string transactionCode)
{
    FactorState=FactorState.Paid;
    FactorStateBase = new PaidFactorState(id, messageNumber, paymentId, transactionCode);
}

Aucun commentaire:

Enregistrer un commentaire