public static IdentityResource ToModel(this Entities.IdentityResource identityResource) { if (identityResource == null) { return(null); } return(Mapper.Map <Entities.IdentityResource, IdentityResource>(identityResource)); }
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)); }
/// <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)); }
public static IdentityResource ToModel(this Entities.IdentityResource resource) { return(resource == null ? null : Mapper.Map <IdentityResource>(resource)); }
public void AddIdentityResource(Entities.IdentityResource entity) { _identityResources.Add(entity); }