none
ASP.NET Core CS0535 Does not implement interface RRS feed

  • Question

  • Hi Guy,

     

    Sorry for noob question because new in ASP.NET Core.
    I have the problem that indicate
    Error CS0535 'UserInfoService' does not implement interface member 'IUserInfoService.UpdateLogoutTime(string)' Community.Service D:\repo\Community\Community.Service\Users\UserInfoService.cs 23 Active

    Error CS0535 'UserInfoService' does not implement interface member 'IUserInfoService.UpdateLoginTime(string)' Community.Service D:\repo\Community\Community.Service\Users\UserInfoService.cs 23 Active

    and here is the following code:

     public async Task UpdateLoginTimeAsync(string userId)
            {
                var user = _dbIdentity.Users.Where(x => x.Id == userId).FirstOrDefault();
                user.LoginTime = DateTime.Now;
                _dbIdentity.Users.Update(user);
                await _dbIdentity.SaveChangesAsync();
            }
    
    public async Task UpdateLogOutTimeAsync(string userId)
            {
                var user = _dbIdentity.Users.Where(x => x.Id == userId).FirstOrDefault();
                user.LogoutTime = DateTime.Now;
                _dbIdentity.Users.Update(user);
                await _dbIdentity.SaveChangesAsync();
            }

    May I ask about what I missing? 

    Thank you.


    I am newbie in enterprise as developer.

    Monday, January 21, 2019 5:50 AM

All replies

  • error CS0535 'UserInfoService' does not implement interface member 'IUserInfoService.UpdateLoginTime(string)' Community.Service

    What it means is that 'UserInfoService' class doesn't have an 'IUserInfoService' interface that implements UpdateLoginTime(string)' method 

    https://www.guru99.com/c-sharp-interface.html

    ASP.NET Core can be discussed at ASP.NET forums.

    https://forums.asp.net/

    Monday, January 21, 2019 6:55 AM
  • Hi eng teong,

    Thank you for posting here.

    According your post, your question is more relevant to ASP.NET Core, please post in the following forum.

    https://forums.asp.net/1255.aspx/1?ASP+NET+Core

    The Visual C# forum discuss and ask questions about the C# programming language, IDE, libraries, samples, and tools.

    Best regards,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, January 22, 2019 1:47 AM