public void Update(Booking entity) { var existing = Get(entity.Id); if (existing != null) { existing.DoctorId = entity.DoctorId; existing.ApplicantId = entity.ApplicantId; existing.BookingDateAndTime = entity.BookingDateAndTime; existing.LastUpdated = DateTime.Now; _context.Update(existing); _context.SaveChanges(); } }
public void Update(Doctor entity) { var existing = Get(entity.Id); if (existing != null) { existing.FullName = entity.FullName; existing.Address = entity.Address; existing.PlaceId = entity.PlaceId; existing.LastUpdated = DateTime.Now; _context.Update(existing); _context.SaveChanges(); } }
public void Update(BookingApplicant entity) { var existing = Get(entity.Id); if (existing != null) { existing.FullName = entity.FullName; existing.Email = entity.Email; existing.EmailLastSent = entity.EmailLastSent; existing.NHSNumber = entity.NHSNumber; existing.LastUpdated = DateTime.Now; _context.Update(existing); _context.SaveChanges(); } }