Can you recommend a single downloadable video (one that you have actually watched and that you think is of high quality) introducing LINQ (not to be
confused with "LINQ to SQL") to a somewhat experienced VB.NET/C# developer?
It could be a screen-cast showing real code.
"Downloadable" includes YouTube and ShowMeDo (Flash video)
as the...
Hi there,
I'm building a C# expression tree to evaluate simple expressions. The expression strings are parsed into trees, and respect the basic operators (mathematical, logical and relational) as well as precedence through the use of parantheses.
In addition to the types bool, string and integer - I require some of the elements of the ...
How do you retrieve a comment from an XMLElement using Linq in VB? For example:
<MyXML>
<event type="MyEvent" uid="3">
<start>2009-02-01T12:00:00</start>
<stop>2009-02-01T12:00:30</stop>
<New>1</New>
<x>20</x>
<y>60</y>
<!--Whatever-->
</event>
<event type="MyEvent" uid="3">
<start>2009-02-01T11:00:00<...
Newbie in the Linq to XML arena...
I have a Linq query with results, and I'd like to transform those results into XML. I'm guessing there must be a relatively easy way to do it, but I can't find it...
Thanks!
...
Hi guys,
I am using Linq To XML to create XML that is sent to a third party. I am having difficulty understanding how to create the XML using Linq when part of information I want to send in the XML will be dynamic.
The dynamic part of the XML is held as a string[,] array. This multi dimensional array holds 2 values.
I can 'build' the ...
Hello Everyone,
I have an entity table that is mapped to stored procedures in order to do all of the CRUD operations. The retrieval procedures mapped to this table mirror the properties of the table as they should. This same entity table has a one-to-reference with a lookup table.
I need to be able to access that lookup tables proper...
I'm having some issues with grabbing a list of type "RhsTruck" through Linq and getting them to display.
RhsTruck just has properites Make, Model, Serial etc...
RhsCustomer has properties CustomerName, CustomerAddress, etc...
I keep getting the error "Sequence contains more than one element". Any ideas? Am I approaching this the wrong...
Hi All,
I'm trying to get eager loading working with Subsonic, and it's been returning null for me.
In the method below, I'm trying to hydrate a domain model (UserModel) which contains another domain model (CompanyModel). However, with the code below, UserModel.Company is always null.
What am I missing here. Any help would be appre...
I have a database column, delimited by colons, describing a category hierarchy like so:
ID | Category
100 | Domestic:Trees:Fruit:Apples
I would like to extract only the third segment of the hierarchy "Fruit" from the text. How can I use Linq Regex or Linq Filtering to extract just that segment? Is it a good idea to extract informa...
CONTEXT
I have a list of items (or arbitrary length). I'd like to group them in 'chunks' of a certain size
Example: I have 12 customers [0,1,2,3,4,5,6,7,8,9,10,11] and want to group themin chunks of 5 which would give [0,1,2,3,4] [5,6,7,8,9] [10,11]
NOTE: In reality I am not working with customers or monotonically increasing integers. ...
I have a list in C# of Vendors that all have a Name property. I want to allow a user to filter that list by searching for a Name. The filter string can be a partial or complete match. However, if the resulting list contains an exact match, it should be in position zero in the list with all partial matches after that.
I can get the su...
Hi all,
I'm writing a repositoy now, returning IQueryable results. Does adding filters affect the efficiency? campring to write the clause in the linq.
Such as
IQueryable result = repository.GetAllBooks().Where(book => book.author =="Russell");
Thanks!
...
Hello. I've read about this operator on a book but being that I don't use databases that much, I cannot think of any circunstance where I'd want to get a single item. I mean, I can have a set of conditions, but then I'd use First or Last, not Single. What is the difference? What is the point of having it return just a single item, and th...
i want to create a join between two tables and that the result will include all the two tables columns.
i want to do this without specifying the specific column names, just do select all, because i won't know how many columns will the two tables include and won't know their names.
I JUST WANT TO CREATE JOIN BETWEEN TWO TABLES AND THAT T...
I have a SampleDB that contains 3 tables.
Table Employees (EmployeeID, EmployeeName)
Table Projects (ProjectID, ProjectName)
Table ProjectResources (ProjectID, EmployeeID)
The ProjectResources table is cross reference table that creates a many-to-many relationship between Employees and Projects.
I would like to use LINQ to select all...
Hi,
I have a collection of numbers starting from 1-9. I would like to reshuffle the collection so that the first object in the collection is 6 and everything before 6 is appended to the end of the list e.g. if if the first object is 3 than the collection would look like this: 345678912.
How can i do this using C# and linq?
Any help wo...
I'm in the midst of trying to replace a the Criteria queries I'm using for a multi-field search page with LINQ queries using the new LINQ provider. However, I'm running into a problem getting record counts so that I can implement paging. I'm trying to achieve a result
equivalent to that produced by a CountDistinct projection from the ...
I'm creating some extension methods and I'm getting some errors with RadComboBoxItemCollection, RadComboBoxItemCollection appears to implement IEnumerable but linq keeps giving me errors saying:
"Could not find an implementation of
the query pattern for source type
'Telerik.Web.UI.RadComboBoxItemCollection'.
'Where' not found....
Hi,
I'd like to get with LINQ an employee list, these employees must have in the TypeOfWorks list the typeofWork passed (Id) in argument
public class Employee
{
public virtual IList<EmployeeTypeOfWork> TypeOfWorks { get; set; }
}
public class EmployeeTypeOfWork
{
public virtual Guid Id { get; set...
I have an interface ISerializeDeserialize defined and some classes inheriting the generic interface. I also have some code generated assemblies using the CodeDomProvider which generates classes inherited from the same interface but implementing it with a specific Type.
What I want to achieve is getting a list of the generic implementati...