public async Task<bool> IsExist(string data1, string data2)
{
var db = _dbContextProvider.GetDbContext().Database;
var parameters = new OracleParameter[2];
var pParam1 = new OracleParameter(":param1", OracleDbType.Varchar2, 50) { Value = data1 };
var pParam2 = new OracleParameter(":param2", OracleDbType.Varchar2, 50) { Value = data2 };
string sql = @" select count(1)
from table1 p
where p.Column1 = :param1 and p.Column2 = :param2";
return await db.SqlQuery<int>(sql, pParam2, pParam1).AnyAsync();
}
//Be careful on parameters order.