Call LPAD function in Linq Query
Posted: Wed 02 Mar 2016 12:58
Hello Team,
I am using DotConnect for Oracle (trial Profressional Edition) with Entity Framework 6. I am new to this DotConnect provider and having some issues as below :
1. How do we use or import native Oracle functions through Linq. I tried below code but got exception as "No overload of canonical function 'Edm.Substring' is..."
LPAD function :
var sql = "SELECT VALUE tbl FROM Product as tbl";
var predicate = "Substring(Concat('0000000',it.Product_Number), 7) = '0004321'";
var query = objectContext.CreateQuery<Product>(sql).Where(predicate);
Please reply ASAP.Thanks in advance.
I am using DotConnect for Oracle (trial Profressional Edition) with Entity Framework 6. I am new to this DotConnect provider and having some issues as below :
1. How do we use or import native Oracle functions through Linq. I tried below code but got exception as "No overload of canonical function 'Edm.Substring' is..."
LPAD function :
var sql = "SELECT VALUE tbl FROM Product as tbl";
var predicate = "Substring(Concat('0000000',it.Product_Number), 7) = '0004321'";
var query = objectContext.CreateQuery<Product>(sql).Where(predicate);
Please reply ASAP.Thanks in advance.