public static Entities.IdentityProvider ToEntity(this Models.IdentityProvider idp) { if (idp == null) { return(null); } var entity = new Entities.IdentityProvider(); idp.UpdateEntity(entity); return(entity); }
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(); } } }