0

I have a custom user store that implements IUserClaimStore. That way, I need to implement GetClaimsAsync method, but I am stuck here.

This is my current implementation:

    public Task<IList<Claim>> GetClaimsAsync(T user)
    {
        return Task.FromResult(new List<Claim>());
    }

This is not valid since List does not implement IList. So the question is, how can I do it?

Thanks

Jaime

jstuardo
  • 3,901
  • 14
  • 61
  • 136
  • `List` does implement `IList` - that's not your problem. Just assign the new `List` to a local variable of type `IList` before passing it to `FromResult` – Will Dean Aug 23 '19 at 16:07
  • @WillDean thanks! I could not imagine that I needed to assign a variable first. Now it works. – jstuardo Aug 23 '19 at 21:21

0 Answers0