Example #1
0
        public static Entities.IdentityProvider ToEntity(this Models.IdentityProvider idp)
        {
            if (idp == null)
            {
                return(null);
            }

            var entity = new Entities.IdentityProvider();

            idp.UpdateEntity(entity);
            return(entity);
        }
Example #2
0
        public void Update(Models.IdentityProvider item)
        {
            using (var entities = IdentityServerConfigurationContext.Get())
            {
                ValidateUniqueName(item, entities);

                var dbitem = entities.IdentityProviders.Where(idp => idp.ID == item.ID).FirstOrDefault();
                if (dbitem != null)
                {
                    item.UpdateEntity(dbitem);
                    entities.SaveChanges();
                }
            }
        }