public int UpdateUser(User user, User newData)
        {
            user.Name     = newData.Name;
            user.LastName = newData.LastName;
            user.EMail    = newData.EMail;
            user.Gender   = newData.Gender;

            _fsDataContext.Entry <User>(user).State = EntityState.Modified;
            return(_fsDataContext.SaveChanges());
        }
예제 #2
0
        public Appointment RejectOrConfirmAppointment(Guid id, bool status)
        {
            var appointment = GetAppointment(id);

            if (appointment == null)
            {
                return(null);
            }

            appointment.IsApproved = status;
            _fsDataContext.Entry(appointment).State = EntityState.Modified;
            _fsDataContext.SaveChanges();
            return(appointment);
        }