---------------------------------- //This is the Class******** ---------------------------------- using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Mvc; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Threading.Tasks; namespace OvhokEMarket.Models.OnlyModels.Account.Security { public class IdentityUserExtraEntity : IdentityUser { [NotMapped] public string EncryptedId { get; set; } } } ------------------------------------------------------------------------------ //This is the controller******** ------------------------------------------------------------------------------ [HttpGet] public async Task<IActionResult> ListRoles() { ViewBag.SubscribeRemainingDays = CheckPlanOfClient_RemainingDays();//To Display remainging days in view. ListRolesViewModels listRolesViewModels = new ListRolesViewModels(); listRolesViewModels.IdentityRoleExtraEntityLIST = roleManager.Roles; foreach (var RolesName in listRolesViewModels.IdentityRoleExtraEntityLIST) { RolesName.EncryptedId = protector.Protect(RolesName.Id.ToString());//Encrypted data to pass in Notmapped attribute } return View(listRolesViewModels); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)