locked
Anonymously Hosted DynamicMethods Assembly?? RRS feed

  • Question

  • User677655238 posted

    can anybody tell me what is wrong with this method..

           public IEnumerable getUserProps(string _user) {
               
                var props = from user in dc.GetTable<xxxxx>()
                              where user.xxxx == _user
                              select new
                              {
                                  user.xxxxxxxx
                                  user.xxxxxxxx,
                                  user.xxxxxxxx,
                                  user.xxxxxxxx
                              };

                return props;
            }



    when i loop trhough the results like this:

                    foreach (var item in userData)
                    {
                       
                        Response.Write(item+ "<br>");
                    }


    I get this error: "Anonymously Hosted DynamicMethods Assembly"


    it must be something simple but i cant just figure it out.. 2 days into C#

    Thanks
    JD

    Friday, August 8, 2008 12:09 PM

All replies

  • User-330204900 posted

    Can you copy an past the full error message associated with this issue please [:D]

    Friday, August 8, 2008 2:41 PM
  • User677655238 posted

    that was the full message... at compile time > it was pointing to foreach loop

    Friday, August 8, 2008 2:48 PM
  • User-330204900 posted

    Ah I expected somthing more explicit from the compiler I've had a look around and that is just a term for the first part of the code you wrote, I think this is to do with passing annonymous types, but you best bet is to ask the question again on the c# forum here.

    Sorry i could not be more helpful but this forum is DynamicData which is a new data scaffolding technology for ASP.Net.

    P.S. when you do find the answer post a link here I'd be interested to see it [:D]

    Friday, August 8, 2008 2:53 PM