error converting lambda

3 posts, 0 answers
  1. luca vignando
    luca vignando avatar
    2 posts
    Member since:
    Mar 2006

    Posted 06 Dec 2012 Link to this post

    Hello, I tried to convert
    ctiveRecordStarter.ModelsCreated+=delegate(ActiveRecordModelCollection models, IConfigurationSource source)
    {
        foreach (ActiveRecordModel model in models)
        {
            if(model.Type == typeof(User))
            {
                model.ActiveRecordAtt.Table = "MyUsers";
            }
        }
    };

    in Vb.Net.
    The conversion "works" but the resulting code is wrong.
  2. Radoslav
    Admin
    Radoslav avatar
    1564 posts

    Posted 11 Dec 2012 Link to this post

    Hello luca,

    Could you please try using the following code snippet and let me know if it helps you:
    AddHandler ctiveRecordStarter.ModelsCreated, AddressOf Me. ModelsCreated_EventHandler
     
    Protected Sub ModelsCreated_EventHandler(ByVal models As ActiveRecordModelCollection, ByVal source As IConfigurationSource)
    End Sub

    Looking forward for your reply.

    All the best,
    Radoslav
    the Telerik team

    Consider using RadControls for ASP.NET AJAX (built on top of the ASP.NET AJAX framework) as a replacement for the Telerik ASP.NET Classic controls, See the product support lifecycle here.

  3. luca vignando
    luca vignando avatar
    2 posts
    Member since:
    Mar 2006

    Posted 13 Dec 2012 Link to this post

    Hello,

    I thank you, your solution works.

    Regards.

    Luca
Back to Top