Mar 8, 2011 at 6:55 PM
Edited Mar 8, 2011 at 7:22 PM
I just started using nHydrate and I love the features. But when I wanted to get the top 10 items (ordered by CreatedDate) of a table, I ran into an error:
Cannot implicitly convert type 'System.Linq.IOrderedEnumerable' to 'Facturatie.Business.Objects.ClientCollection'.
An explicit conversion exists (are you missing a cast?)
ClientCollection clients = ClientCollection.RunSelect().OrderBy(x => x.CreatedDate).Take(10);
I'm not sure if I'm doing it correct, because this is the first time I work with LINQ. Eager to learn more about it though.
EDIT: Now that I compile my code, I get errors about Widgetsphere.Core... Do I need to include a reference to solve this?
Example: Error 1 The type 'Widgetsphere.Core.DataAccess.IWrappingClass' is defined in an assembly that is not referenced. You must add a reference to assembly 'Widgetsphere.Core, Version=188.8.131.521, Culture=neutral, PublicKeyToken=5cb8d3744e1198c9'.
D:\My Documents\My Projects\Facturatie\Facturatie\WinForms\Intro.cs