public async Task <List <IPersonModel> > ReadPerson() { Utils.NLogMessage(this.GetType(), $"{"Read Person"}", Utils.NLogType.Info); IList <PersonModel> person = null; try { OracleDynamicParameters parameters = new OracleDynamicParameters(); parameters.Add("RC1", OracleDbType.RefCursor, ParameterDirection.Output); person = await _dataAccess.LoadData <PersonModel, dynamic>("GEN_SEL_PERSONS_SP", parameters, "OracleConnectionString"); } catch (Exception e) { Utils.NLogMessage(this.GetType(), $" {e.Message} - {e.InnerException}", Utils.NLogType.Error); } return(person.ToList <IPersonModel>()); }
public async Task <IList <IDepositModel> > GetDeposits(string openDate) { IList <DepositModel> deposit = null; try { OracleDynamicParameters parameters = new OracleDynamicParameters(); parameters.Add("p_branch", OracleDbType.Varchar2, ParameterDirection.Input, "H"); parameters.Add("p_opendate", OracleDbType.Varchar2, ParameterDirection.Input, openDate); parameters.Add("p_codesubject", OracleDbType.Varchar2, ParameterDirection.Input, "H"); parameters.Add("p_currency", OracleDbType.Varchar2, ParameterDirection.Input, "H"); parameters.Add("p_deposittype", OracleDbType.Varchar2, ParameterDirection.Input, "H"); parameters.Add("RC1", OracleDbType.RefCursor, ParameterDirection.Output); deposit = await _dataAccess.LoadData <DepositModel, dynamic>("RPT_SEL_DEPOSITS_SP", parameters, "OracleConnectionString"); } catch (Exception e) { Utils.NLogMessage(this.GetType(), $" {e.Message} - {e.InnerException}", Utils.NLogType.Error); } return(deposit.ToList <IDepositModel>()); }