示例#1
0
        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);
        }
示例#2
0
 public async Task UpdateAsync(IdentityGrant entity)
 {
     context.Set <IdentityGrant>().Update(entity);
     await context.SaveEntitiesAsync();
 }
示例#3
0
 public async Task AddAsync(IdentityGrant entity)
 {
     context.Set <IdentityGrant>().Add(entity);
     await context.SaveEntitiesAsync();
 }