I am using additional validation using AspnetIdentity but it is not working gives me this error. Here is my code for interface.
using Health.BLL.CustomModels.UserModels;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.EntityFramework;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Health.BLL.AuthRepository
{
public interface IAuthRepository
{
Task<IdentityResult> RegisterUser(UserModel userModel);
Task<IdentityUser> FindUser(string userName, string password);
Task<IList<string>> GetRolesAsync(string userid);
Task<IdentityResult> ValidateAsync<TUser>(UserManager<TUser> manager, TUser user) where TUser : class;
}
}
For error reference please see the below image.
The type 'TUser' cannot be used as type parameter 'TUser' in the generic type or method 'UserManager'. There is no implicit reference conversion from 'TUser' to 'Microsoft.AspNet.Identity.IUser'.
UserManager<TUser>and copy the constraint forTUserto your method definition's constraint forTUser