Esempio n. 1
0
        public void UpdateSpots(string day)
        {
            var selectedDay = Db.Capacity.FirstOrDefault(x => x.Name.ToLower().Equals(day.ToLower()));

            if (selectedDay != null && selectedDay.Spots > 0)
            {
                selectedDay.Spots -= 1;
            }

            Db.SaveChanges();
        }
Esempio n. 2
0
        public void Add(User user)
        {
            DbContext.Users.Add(user);

            DbContext.SaveChanges();
        }