Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Anton Oosthuizen 192 posts 470 karma points
    Jun 16, 2015 @ 22:29
    Anton Oosthuizen
    0

    Umbraco.Core.Services.IMemberService' does not contain a definition for 'Save'

    Hi

    I'm trying to create a member but are receiving this weird error.

    Umbraco.Core.Services.IMemberService' does not contain a definition for 'Save'

    My API code

    var newmember = ApplicationContext.Current.Services.MemberService.CreateMember(user.email, user.email, user.name, "MyGift");
      ApplicationContext.Current.Services.MemberService.Save(newmember, false);
    

    What am I missing?

  • Alex Skrypnyk 5908 posts 22603 karma points MVP 4x admin c-trib
    Jun 17, 2015 @ 12:23
    Alex Skrypnyk
    0

    Hi Anton,

    This code works fine for me:

    Services.MemberService.Save(currentMember);
    
  • Anton Oosthuizen 192 posts 470 karma points
    Jun 17, 2015 @ 12:43
    Anton Oosthuizen
    0

    Yeah it is damn strange . I can see the fuction in intellisence but it crashes at runtime

  • Alex Skrypnyk 5908 posts 22603 karma points MVP 4x admin c-trib
    Jun 17, 2015 @ 12:47
    Alex Skrypnyk
    0

    was member created successfully?

  • Alex Lindgren 158 posts 355 karma points
    Jul 01, 2016 @ 19:12
    Alex Lindgren
    1

    Is your user object a dynamic? I had a similar issue but for GetByEmail when I was passing in user.Email where user was a dynamic object I had created by parsing JSON. In my case, casting the properties to string seemed to make it work.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies