public static Entities.Scope ToEntity(this IdentityServer3.Core.Models.Scope s) { if (s == null) { return(null); } if (s.Claims == null) { s.Claims = new List <IdentityServer3.Core.Models.ScopeClaim>(); } if (s.ScopeSecrets == null) { s.ScopeSecrets = new List <IdentityServer3.Core.Models.Secret>(); } return(Mapper.Map <IdentityServer3.Core.Models.Scope, Entities.Scope>(s)); }
public void AutomapperConfigurationIsValid() { IdentityServer3.Core.Models.Scope s = new IdentityServer3.Core.Models.Scope() { }; var e = s.ToEntity(); IdentityServer3.Core.Models.Client c = new IdentityServer3.Core.Models.Client() { }; var e2 = c.ToEntity(); IdentityScope s2 = new IdentityScope() { ScopeClaims = new HashSet <IdentityServer3.EntityFramework.Entities.ScopeClaim>(), ScopeSecrets = new HashSet <IdentityServer3.EntityFramework.Entities.ScopeSecret>(), }; var m = s2.ToModel(); EntitiesMap.Config.AssertConfigurationIsValid(); }
public void AutomapperConfigurationIsValid() { IdentityServer3.Core.Models.Scope s = new IdentityServer3.Core.Models.Scope() { }; var e = s.ToEntity(); IdentityServer3.Core.Models.Client c = new IdentityServer3.Core.Models.Client() { }; var e2 = c.ToEntity(); IdentityScope s2 = new IdentityScope() { ScopeClaims = new HashSet<IdentityServer3.EntityFramework.Entities.ScopeClaim>(), ScopeSecrets = new HashSet<IdentityServer3.EntityFramework.Entities.ScopeSecret>(), }; var m = s2.ToModel(); EntitiesMap.Config.AssertConfigurationIsValid(); }