Click here to Skip to main content
14,392,692 members
   

C#

 
AnswerRe: How to do three join between three list Pin
Vinod Jangle9-Apr-19 4:22
MemberVinod Jangle9-Apr-19 4:22 
QuestionRepeated join causing poor performance in for loop Pin
Mou_kol7-Apr-19 9:10
MemberMou_kol7-Apr-19 9:10 
AnswerRe: Repeated join causing poor performance in for loop Pin
jschell7-Apr-19 9:57
Memberjschell7-Apr-19 9:57 
GeneralRe: Repeated join causing poor performance in for loop Pin
Mou_kol8-Apr-19 10:07
MemberMou_kol8-Apr-19 10:07 
AnswerRe: Repeated join causing poor performance in for loop Pin
Luc Pattyn7-Apr-19 16:44
sitebuilderLuc Pattyn7-Apr-19 16:44 
GeneralRe: Repeated join causing poor performance in for loop Pin
Mou_kol8-Apr-19 10:13
MemberMou_kol8-Apr-19 10:13 
GeneralRe: Repeated join causing poor performance in for loop Pin
Luc Pattyn8-Apr-19 10:14
sitebuilderLuc Pattyn8-Apr-19 10:14 
QuestionC# List: How to do 3 joins for better performance Pin
Mou_kol7-Apr-19 3:44
MemberMou_kol7-Apr-19 3:44 
see the code first
var cfToggleList = (from cf in QCHelperall
        join toggle in ToggleDataAll
          on new { val = cf.Section.Trim().ToUpper(), 
          val1 = cf.Li.Trim().ToUpper(), 
          val2 = cf.Period.Replace("A", "").Replace("E", "").Trim().ToUpper(), 
          val3 = cf.Broker.Trim().ToUpper() }

          equals new { val = toggle.Section.Trim().ToUpper(), 
          val1 = toggle.Lineitem.Trim().ToUpper(), 
          val2 = toggle.Period.Trim().ToUpper(), 
          val3 = toggle.Broker.Trim().ToUpper() }

          into tempJoin
        from leftJoin in tempJoin.DefaultIfEmpty()
        select new QCHelper()
        {
            Broker = cf.Broker,
            BrokerName = (from brk in BrokerCodeName
                  where brk.BrokerCode.ToUpper() == cf.Broker.Split('-')[0].ToUpper()
                  select brk.BrokerName).FirstOrDefault(),
            Section = cf.Section,
            Li = cf.Li,
            StandardDate = cf.Period,
            Value = cf.Value,
            FycheckToggle = leftJoin == null ? string.Empty : (leftJoin.ToggleText.Contains("FYCHECKTOGGLE") ? leftJoin.ToggleText : string.Empty),
            QcCheckToggle = leftJoin == null ? string.Empty : (leftJoin.ToggleText.Contains("QCCHECKTOGGLE") ? leftJoin.ToggleText : string.Empty)
        }).ToList<QCHelper>();


There is left join between two list called QCHelperall & ToggleDataAll and for each iteration i am fetching data from another list based on match. i am talking about this code

BrokerName = (from brk in BrokerCodeName
          where brk.BrokerCode.ToUpper() == cf.Broker.Split('-')[0].ToUpper()
          select brk.BrokerName).FirstOrDefault(),


can i join BrokerCodeName with QCHelperall list with equi join. if possible then please give me code where one left join will be between QCHelperall & ToggleDataAll and one equi join between BrokerCodeName with QCHelperall in same place. i believe if i can do it then code execution will be must faster.

thanks
AnswerRe: C# List: How to do 3 joins for better performance Pin
Gerry Schmitz7-Apr-19 7:17
mveGerry Schmitz7-Apr-19 7:17 
GeneralRe: C# List: How to do 3 joins for better performance Pin
Mou_kol7-Apr-19 9:06
MemberMou_kol7-Apr-19 9:06 
AnswerRe: C# List: How to do 3 joins for better performance Pin
Dave Kreskowiak7-Apr-19 7:39
mveDave Kreskowiak7-Apr-19 7:39 
GeneralRe: C# List: How to do 3 joins for better performance Pin
Mou_kol7-Apr-19 9:05
MemberMou_kol7-Apr-19 9:05 
GeneralRe: C# List: How to do 3 joins for better performance Pin
Dave Kreskowiak7-Apr-19 9:29
mveDave Kreskowiak7-Apr-19 9:29 
GeneralRe: C# List: How to do 3 joins for better performance Pin
Mou_kol8-Apr-19 10:06
MemberMou_kol8-Apr-19 10:06 
GeneralRe: C# List: How to do 3 joins for better performance Pin
Dave Kreskowiak8-Apr-19 10:24
mveDave Kreskowiak8-Apr-19 10:24 
AnswerRe: C# List: How to do 3 joins for better performance Pin
Mycroft Holmes7-Apr-19 13:17
MemberMycroft Holmes7-Apr-19 13:17 
GeneralRe: C# List: How to do 3 joins for better performance Pin
Mou_kol8-Apr-19 10:09
MemberMou_kol8-Apr-19 10:09 
QuestionHow to make code run differently depending on the platform it is running on? Pin
Xarzu5-Apr-19 7:44
MemberXarzu5-Apr-19 7:44 
AnswerRe: How to make code run differently depending on the platform it is running on? Pin
Richard Deeming5-Apr-19 8:15
communityengineerRichard Deeming5-Apr-19 8:15 
AnswerRe: How to make code run differently depending on the platform it is running on? Pin
Gerry Schmitz5-Apr-19 10:54
mveGerry Schmitz5-Apr-19 10:54 
AnswerRe: How to make code run differently depending on the platform it is running on? Pin
jschell7-Apr-19 10:00
Memberjschell7-Apr-19 10:00 
Questionc# Pin
Member 142150015-Apr-19 5:29
MemberMember 142150015-Apr-19 5:29 
AnswerRe: c# Pin
OriginalGriff5-Apr-19 5:39
mveOriginalGriff5-Apr-19 5:39 
QuestionRe: c# Pin
ZurdoDev5-Apr-19 5:49
professionalZurdoDev5-Apr-19 5:49 
AnswerRe: c# Pin
Dave Kreskowiak5-Apr-19 14:03
mveDave Kreskowiak5-Apr-19 14:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.