Exemplo n.º 1
0
        public static IdentityResult CreateUser <TUser, TKey>(this UserManager <TUser, TKey> manager, TUser user, string password, params string[] roles)
            where TUser : class, IUser <TKey>
            where TKey : IEquatable <TKey>
        {
            var result = manager.CreateUser(user, password);

            manager.AddUserToRoles(user.Id, roles);
            return(result);
        }