Example #1
0
        public virtual void Add(T item)
        {
            Remove(item);

            _dbContext.Set <Kooboo.CMS.Membership.Models.Membership>().Attach(item.Membership);
            _dbContext.Set <T>().Add(item);
            _dbContext.SaveChanges();
        }
        public override void Update(MembershipConnect @new, MembershipConnect old)
        {
            var entity = Get(@new);

            entity.DisplayName      = @new.DisplayName;
            entity.AppId            = @new.AppId;
            entity.AppSecret        = @new.AppSecret;
            entity.Options          = @new.Options;
            entity.MembershipGroups = @new.MembershipGroups;
            entity.Enabled          = @new.Enabled;
            _dbContext.SaveChanges();
        }
Example #3
0
 public void Add(Models.Membership item)
 {
     _dbContext.Set <Kooboo.CMS.Membership.Models.Membership>().Add(item);
     _dbContext.SaveChanges();
 }
 public override void Update(MembershipUser @new, MembershipUser old)
 {
     _dbContext.SaveChanges();
 }