SolvedPrivate

searching with linq

Posted on 2014-02-07
1
55 Views
Last Modified: 2016-02-10
I have the following data.  I need to represent this in code somehow..like a struct, or lookup...dictionary..which ever is the best way...and then be able to find the info with LINQ.  How would I set this up.


<KeyPaths>
            <KeyPath EventType="API" Key="MRC" Path="PRPS/PRP[@KEY='MRC']" />
            <KeyPath EventType="API" Key="ARC" Path="PRPS/PRP[@KEY='ARC']" />
            <KeyPath EventType="API" Key="SCHEDULE_CANCEL"   Path="PRPS/PRP[@KEY='SCHEDULE_CANCEL']" />
            <KeyPath EventType="API" Type="Default" Path="FLDS/FLD[@KEY='{0}']" />
            <KeyPath EventType="DMN" Type="Default" Path="{0}" />
</KeyPaths>
0
Comment
Question by:Robb Hill
1 Comment
 
LVL 21

Accepted Solution

by:
Craig Wagner earned 500 total points
Comment Utility
public class KeyPath
{
    public string EventType { get; set; }
    public string Key { get; set; }
    public string Type { get; set; }
    public string Path { get; set; }
}

var keyPaths = new List<KeyPath>();

Open in new window

0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Paging GridView 7 32
How do I bind the results to a grid 3 22
Image(7) 1 33
Unable  to create new object 9 19
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now