Adding
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using LCU.Library.Internal.CoreApiWrapperModel.LcuModels.LoanPayoff;
|
||||
|
||||
namespace LCU.Library.Internal.CoreApiWrapperLib.DataAccess
|
||||
{
|
||||
public interface ILoanPayoffDao
|
||||
{
|
||||
Task<List<LoanPayoff>> GetLoanPayoffByAccountNumber(long accountNumber, string dateRange);
|
||||
Task<List<LoanPayoff>> GetLoanPayoffByVIN(string VIN, string dateRange);
|
||||
}
|
||||
}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using LCU.Library.Internal.CoreApiWrapperLib.Utilities;
|
||||
using LCU.Library.Internal.CoreApiWrapperLib.Configuration;
|
||||
using LCU.Library.Internal.CoreApiWrapperLib.CoreApiUtilities;
|
||||
using LCU.Library.Internal.CoreApiWrapperLib.CoreDbUtilities;
|
||||
using LCU.Library.Internal.CoreApiWrapperModel.LcuModels.LoanPayoff;
|
||||
|
||||
namespace LCU.Library.Internal.CoreApiWrapperLib.DataAccess
|
||||
{
|
||||
public class LoanPayoffDao : BaseCoreDao, ILoanPayoffDao
|
||||
{
|
||||
private readonly ICoreDbExecution _coreDbExecution;
|
||||
|
||||
public LoanPayoffDao(ICoreRequest coreRequest, CoreConfiguration coreConfiguration, ICoreDbExecution coreDbExecution) : base(coreRequest)
|
||||
{
|
||||
_coreDbExecution = coreDbExecution;
|
||||
}
|
||||
|
||||
public async Task<List<LoanPayoff>> GetLoanPayoffByAccountNumber(long accountNumber, string dateRange)
|
||||
{
|
||||
var query = QueryUtilities.GetQuery("LoanPayoff/LoanPayoffByAccountNumberQuery");
|
||||
var accountActivityParams = new
|
||||
{
|
||||
dateRange = dateRange,
|
||||
accountNumber = accountNumber
|
||||
};
|
||||
var results =
|
||||
await _coreDbExecution.ExecuteQuery<LoanPayoff, object>(query, accountActivityParams);
|
||||
return results.ToList();
|
||||
}
|
||||
|
||||
public async Task<List<LoanPayoff>> GetLoanPayoffByVIN(string VIN, string dateRange)
|
||||
{
|
||||
var query = QueryUtilities.GetQuery("LoanPayoff/LoanPayoffByVINQuery");
|
||||
var accountActivityParams = new
|
||||
{
|
||||
dateRange = dateRange,
|
||||
VIN = VIN
|
||||
|
||||
};
|
||||
var results =
|
||||
await _coreDbExecution.ExecuteQuery<LoanPayoff, object>(query, accountActivityParams);
|
||||
return results.ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user