public static PersistedGrant Transfer(IdentityGrant idsGrant) { var grant = new PersistedGrant(); grant.Key = idsGrant.Id; grant.Type = idsGrant.Type; grant.SubjectId = idsGrant.SubjectId; grant.ClientId = idsGrant.ClientId; grant.CreationTime = idsGrant.CreationTime; grant.Data = idsGrant.Data; grant.Expiration = idsGrant.Expiration; return(grant); }
public async Task UpdateAsync(IdentityGrant entity) { context.Set <IdentityGrant>().Update(entity); await context.SaveEntitiesAsync(); }
public async Task AddAsync(IdentityGrant entity) { context.Set <IdentityGrant>().Add(entity); await context.SaveEntitiesAsync(); }