public async Task<MemberDetailTransaction> GetDetailsOfMemberTransaction61(int memberId)
{
var idData = await (from mt in _context.MemberTransactionDetails
where mt.MemberID == memberId
&& mt.TransactionTypeID == 52401
&& (mt.Name.Contains("vraj") || mt.Name == null)
orderby mt.UpdatedDate.HasValue ? mt.UpdatedDate : mt.CreatedDate descending
select new MemberDetailTransaction()
{
ContractId = mt.ContractID,
ContractDescription = mt.ContractID == null ? "" : _context.CommonCodes.FirstOrDefault(x => x.CommonCodeID == mt.ContractID).LongDescription,
PbpId = mt.PBPID,
PbpDescription = mt.PBPID == null ? "" : _context.CommonCodes.FirstOrDefault(x => x.CommonCodeID == mt.PBPID).LongDescription,
}).FirstOrDefaultAsync();
return idData;
}