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 206 posts 486 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 6163 posts 24143 karma points MVP 8x 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 206 posts 486 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 6163 posts 24143 karma points MVP 8x admin c-trib
    Jun 17, 2015 @ 12:47
    Alex Skrypnyk
    0

    was member created successfully?

  • Alex Lindgren 159 posts 356 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.

Please Sign in or register to post replies

Write your reply to:

Draft