S
Sudip_inn
Guest
see this is my object query. now db is there.
i am joining two list but Value field is getting empty. things not clear why this is happening.
i am talking about this line Value = leftJoin == null ? string.Empty : (leftJoin.Value == null ? string.Empty : leftJoin.Value),
var QCViewAllHistValue = (from frmlst in cfList
join viewalllst in QCViewAllBrokerList
on new
{
val = String.IsNullOrEmpty(frmlst.Section) ? "" : frmlst.Section.Trim().ToUpper(),
//val1 = String.IsNullOrEmpty(frmlst.Li) ? "" : frmlst.Li.Trim().ToUpper(),
val1 = String.IsNullOrEmpty(frmlst.xFundCode) ? "" : frmlst.xFundCode.Trim(),
val2 = String.IsNullOrEmpty(frmlst.Period) ? "" : frmlst.Period.Replace("A", "").Replace("E", "").Trim().ToUpper(),
val3 = String.IsNullOrEmpty(frmlst.Broker) ? "" : frmlst.Broker.Trim().ToUpper()
}
equals new
{
val = String.IsNullOrEmpty(viewalllst.ViewAllSection) ? "" : viewalllst.ViewAllSection.Trim().ToUpper(),
//val1 = String.IsNullOrEmpty(viewalllst.ViewAllLineItem) ? "" : viewalllst.ViewAllLineItem.Trim().ToUpper(),
val1 = String.IsNullOrEmpty(viewalllst.xFundCode) ? "" : viewalllst.xFundCode.Trim(),
val2 = String.IsNullOrEmpty(viewalllst.ViewAllPeriod) ? "" : viewalllst.ViewAllPeriod.Replace("A", "").Replace("E", "").Trim().ToUpper(),
val3 = String.IsNullOrEmpty(viewalllst.ViewAllBroker) ? "" : viewalllst.ViewAllBroker.Trim().ToUpper()
}
into tempJoin
from leftJoin in tempJoin.DefaultIfEmpty()
select new QCHelper()
{
Broker = frmlst == null ? string.Empty : frmlst.Broker == null ? string.Empty : frmlst.Broker,
Section = frmlst == null ? string.Empty : frmlst.Section == null ? string.Empty : frmlst.Section,
Li = frmlst == null ? string.Empty : frmlst.Li == null ? string.Empty : frmlst.Li,
Period = frmlst == null ? string.Empty : frmlst.Period == null ? string.Empty : frmlst.Period,
CrossCalc1Q = frmlst == null ? string.Empty : frmlst.CrossCalc1Q == null ? string.Empty : frmlst.CrossCalc1Q,
CrossCalc2Q = frmlst == null ? string.Empty : frmlst.CrossCalc2Q == null ? string.Empty : frmlst.CrossCalc2Q,
CrossCalc3Q = frmlst == null ? string.Empty : frmlst.CrossCalc3Q == null ? string.Empty : frmlst.CrossCalc3Q,
CrossCalc4Q = frmlst == null ? string.Empty : frmlst.CrossCalc4Q == null ? string.Empty : frmlst.CrossCalc4Q,
CrossCalcFY = frmlst == null ? string.Empty : frmlst.CrossCalcFY == null ? string.Empty : frmlst.CrossCalcFY,
Value = leftJoin == null ? string.Empty : (leftJoin.Value == null ? string.Empty : leftJoin.Value),
}).ToList<QCHelper>();
now please how to debug and know the exact reason why value field is getting empty ?
guide me in detail as a result i should be able to capture the reason. thanks
Continue reading...
i am joining two list but Value field is getting empty. things not clear why this is happening.
i am talking about this line Value = leftJoin == null ? string.Empty : (leftJoin.Value == null ? string.Empty : leftJoin.Value),
var QCViewAllHistValue = (from frmlst in cfList
join viewalllst in QCViewAllBrokerList
on new
{
val = String.IsNullOrEmpty(frmlst.Section) ? "" : frmlst.Section.Trim().ToUpper(),
//val1 = String.IsNullOrEmpty(frmlst.Li) ? "" : frmlst.Li.Trim().ToUpper(),
val1 = String.IsNullOrEmpty(frmlst.xFundCode) ? "" : frmlst.xFundCode.Trim(),
val2 = String.IsNullOrEmpty(frmlst.Period) ? "" : frmlst.Period.Replace("A", "").Replace("E", "").Trim().ToUpper(),
val3 = String.IsNullOrEmpty(frmlst.Broker) ? "" : frmlst.Broker.Trim().ToUpper()
}
equals new
{
val = String.IsNullOrEmpty(viewalllst.ViewAllSection) ? "" : viewalllst.ViewAllSection.Trim().ToUpper(),
//val1 = String.IsNullOrEmpty(viewalllst.ViewAllLineItem) ? "" : viewalllst.ViewAllLineItem.Trim().ToUpper(),
val1 = String.IsNullOrEmpty(viewalllst.xFundCode) ? "" : viewalllst.xFundCode.Trim(),
val2 = String.IsNullOrEmpty(viewalllst.ViewAllPeriod) ? "" : viewalllst.ViewAllPeriod.Replace("A", "").Replace("E", "").Trim().ToUpper(),
val3 = String.IsNullOrEmpty(viewalllst.ViewAllBroker) ? "" : viewalllst.ViewAllBroker.Trim().ToUpper()
}
into tempJoin
from leftJoin in tempJoin.DefaultIfEmpty()
select new QCHelper()
{
Broker = frmlst == null ? string.Empty : frmlst.Broker == null ? string.Empty : frmlst.Broker,
Section = frmlst == null ? string.Empty : frmlst.Section == null ? string.Empty : frmlst.Section,
Li = frmlst == null ? string.Empty : frmlst.Li == null ? string.Empty : frmlst.Li,
Period = frmlst == null ? string.Empty : frmlst.Period == null ? string.Empty : frmlst.Period,
CrossCalc1Q = frmlst == null ? string.Empty : frmlst.CrossCalc1Q == null ? string.Empty : frmlst.CrossCalc1Q,
CrossCalc2Q = frmlst == null ? string.Empty : frmlst.CrossCalc2Q == null ? string.Empty : frmlst.CrossCalc2Q,
CrossCalc3Q = frmlst == null ? string.Empty : frmlst.CrossCalc3Q == null ? string.Empty : frmlst.CrossCalc3Q,
CrossCalc4Q = frmlst == null ? string.Empty : frmlst.CrossCalc4Q == null ? string.Empty : frmlst.CrossCalc4Q,
CrossCalcFY = frmlst == null ? string.Empty : frmlst.CrossCalcFY == null ? string.Empty : frmlst.CrossCalcFY,
Value = leftJoin == null ? string.Empty : (leftJoin.Value == null ? string.Empty : leftJoin.Value),
}).ToList<QCHelper>();
now please how to debug and know the exact reason why value field is getting empty ?
guide me in detail as a result i should be able to capture the reason. thanks
Continue reading...