Query Db from within a Linq Query - C# -
I do a question on my XML file with Linq and when I parsed the data from the XML and received the data, I would go I can perform 2 calls as my snipet show against DB to fill 2 properties of my object needs, but I just need to make a call and 2 properties To populate ClientID and to modify the date I need to call 2. There is a table called Client, which contains these 2 columns, ClientID and ClientName. Apart from this, when I need to pass it as an absolute in GetClientID and GetClientName, as in my code above, I need to end the result from XDocument. "Post-text" itemprop = "text"> How about something like this: It still reads only two columns that you need (though, to name a few assumptions).
var q = Recently in orderdeskdock. Decentendant ("prop") handle = c. Give the element ("handle") the customer template id = (string) c.Element ("TemplateID") client = DataContext.Clients. Where (x = & gt; x.ClientTemplateID == clientTemplateID). Select (x = & gt; new {x.ClientID, x.ClientName}). Single () New ReturnResult Selection () {clientTemplateID = clientTemplateID, handle = resultref! = Null? (String) resultref.Attribute ("handle"): Null, ClientID = client.ClientID, CLIENTNAME = client.ClientName};
Comments
Post a Comment