Ejemplo n.º 1
0
        public static IdentityResource ToModel(this Entities.IdentityResource identityResource)
        {
            if (identityResource == null)
            {
                return(null);
            }

            return(Mapper.Map <Entities.IdentityResource, IdentityResource>(identityResource));
        }
Ejemplo n.º 2
0
        public void CanMapIdentityResources()
        {
            IdentityResource model = new IdentityResource();

            Entities.IdentityResource mappedEntity = model.ToEntity();
            IdentityResource          mappedModel  = mappedEntity.ToModel();

            Assert.NotNull(mappedModel);
            Assert.NotNull(mappedEntity);
        }
 /// <summary>
 /// Maps an entity to a model.
 /// </summary>
 /// <param name="entity">The entity.</param>
 /// <returns></returns>
 public static Models.IdentityResource ToModel(this Entities.IdentityResource entity)
 {
     return(entity == null ? null : Mapper.Map <Models.IdentityResource>(entity));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Maps an entity to a model.
 /// </summary>
 /// <param name="entity">The entity.</param>
 /// <returns></returns>
 public static IdentityServer4.Models.IdentityResource ToModel(this Entities.IdentityResource entity)
 {
     return(Mapper.Map <IdentityServer4.Models.IdentityResource>(entity));
 }
Ejemplo n.º 5
0
 public static IdentityResource ToModel(this Entities.IdentityResource resource)
 {
     return(resource == null ? null : Mapper.Map <IdentityResource>(resource));
 }
Ejemplo n.º 6
0
 public void AddIdentityResource(Entities.IdentityResource entity)
 {
     _identityResources.Add(entity);
 }