Exemplo n.º 1
0
        public void DeactivatedSub(string userid)
        {
            var model = _db.Subscribed.Where(r => r.SubscribtionExpiryDate < DateTime.Now).ToList();
            var va    = model.FirstOrDefault(r => r.IsSubscribed);

            va.IsSubscribed     = false;
            _db.Entry(va).State = EntityState.Modified;
            _db.SaveChanges();
        }
Exemplo n.º 2
0
        public bool GetvaluebyproviderNameAndUserid(string providername, string Userid)
        {
            var item = _db.ClickTrackers.Where(r => r.UserId.Equals(Userid) && r.ProvideName.Equals(providername)).ToList();

            if (item.Count <= 0)
            {
                var click = new ClickTracker();
                click.ProvideName = providername;
                click.UserId      = Userid;
                _db.ClickTrackers.Add(click);
                _db.SaveChanges();
                return(false);
            }



            return(true);
        }
 public bool Commit()
 {
     return(_db.SaveChanges() > 0);
 }
Exemplo n.º 4
0
 public void Add(MapLoans loan)
 {
     db.MapLoandata.Add(loan);
     db.SaveChanges();
 }