We have application which should work on both sql server and oracle.we have used Sql functions in all over application. now we are migrating to oracle. below are Sql Functions that we used.
SqlFunctions.StringConvert()
SqlFunctions.DateAdd()
SqlFunctions.Replicate()
SqlFunctions.DateDiff()
Now we need alternative for above functions which will work with oracle. after google a lot the solution that i found is - use of AsEnumerable() or ToList() fetch records in memory then do the conversion but this methods are not good for performance as we have huge records in table. any other alternative ?
Linq Query ex -
var _IBTFile = from c in DataContext.DB0820205
join s in DataContext.DB0820005 on c.ReconcileId equals s.PkId
join a in DataContext.DB0820005 on c.ReconcileWithId equals a.PkId
where s.status != upoaded && s.ReconciliationOnDate == EntryDate && s.InstrumentNo != 0
&& c.ReconProcessType == ReconProcessType
select new IBTFileUploadVm
{
PkId = s.PkId,
InstrumentNo =System.Data.Entity.SqlServer.SqlFunctions.StringConvert( s.InstrumentNo),
LcyAmount = s.FcyAmount,
ReconDate = s.ReconciliationOnDate,
ReconType = 0,
DDDetailsVm = new DB0820002Vm
{
PkId = a.PkId,
PrintedDDNumberString =System.Data.Entity.SqlServer.SqlFunctions.StringConvert( s.InstrumentNo),
RemittanceAmount = a.FcyAmount,
BranchName = "",
},
PostDate = a.PostDate,
ValueDate = s.ReconciliationOnDate,
db0820205id = c.PkId,
};
return _IBTFile;