Exemplo n.º 1
0
        public void ChangeName(int therapistId, string newName)
        {
            var foundTherapist = _db.Therapists.FirstOrDefault(o => o.Id == therapistId);

            foundTherapist.Name             = newName;
            _db.Entry(foundTherapist).State = System.Data.Entity.EntityState.Modified;
            _db.SaveChanges();
        }
Exemplo n.º 2
0
        public void ChangeAge(int clientId, int newAge)
        {
            var foundClient = _db.Clients.FirstOrDefault(o => o.Id == clientId);

            foundClient.Age = newAge;
            _db.Entry(foundClient).State = System.Data.Entity.EntityState.Modified;
            _db.SaveChanges();
        }