none
Compile errors with POCO RRS feed

  • Question

  • Hi all,

    I have the following property:

            public static List<User> Users
            {
                get 
                {
                    var allUsers = from u in ctx.Users select u;
                    List<User> result = allUsers.ToList();
    
                    return result;
                }
            }
    

    I have compile 2 errors:

    1. select - Cannot convert lambda expression to type 'string' because it is not a delegate type

    2. ToList - 'System.Data.Objects.ObjectQuery<System.Data.Common.DbDataRecord>' does not contain a definition for 'ToList' and no extension method 'ToList' accepting a first argument of type 'System.Data.Objects.ObjectQuery<System.Data.Common.DbDataRecord>' could be found (are you missing a using directive or an assembly reference?)

    What's wrong here?

    Thanks,

    Ivan

    Wednesday, May 9, 2012 12:25 PM

Answers

All replies