Adding
This commit is contained in:
+35
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using LCU.Library.Internal.CoreApiWrapperLib.Utilities;
|
||||
using LCU.Library.Internal.CoreApiWrapperLib.CoreApiUtilities;
|
||||
using LCU.Library.Internal.CoreApiWrapperLib.CoreDbUtilities;
|
||||
using LCU.Library.Internal.CoreApiWrapperModel.CoreModels.Associate;
|
||||
|
||||
namespace LCU.Library.Internal.CoreApiWrapperLib.DataAccess
|
||||
{
|
||||
public class AssociateDao : BaseCoreDao, IAssociateDao
|
||||
{
|
||||
private const string GetAssociateDetailsBySsnQuery = "Associate/GetAssociateDetailsBySsnQuery";
|
||||
|
||||
private readonly ICoreDbExecution _coreDbExecution;
|
||||
|
||||
public AssociateDao(ICoreRequest coreRequest,
|
||||
ICoreDbExecution coreDbExecution)
|
||||
: base(coreRequest)
|
||||
{
|
||||
_coreDbExecution = coreDbExecution;
|
||||
}
|
||||
|
||||
public async Task<AssociateDetails> GetAssociateDetailsBySsn(string taxId)
|
||||
{
|
||||
var query = QueryUtilities.GetQuery(GetAssociateDetailsBySsnQuery);
|
||||
var queryParameters = new
|
||||
{
|
||||
taxId = taxId
|
||||
};
|
||||
|
||||
return (await _coreDbExecution.ExecuteQuery<AssociateDetails, dynamic>(query, queryParameters)).FirstOrDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user