public DoctorsSchedule Update(DoctorsSchedule doctorsScheduleChanges) { var doctorschedul = context.DoctorsSchedule.Attach(doctorsScheduleChanges); doctorschedul.State = Microsoft.EntityFrameworkCore.EntityState.Modified; context.SaveChanges(); return(doctorsScheduleChanges); }
public DoctorsSchedule Add(DoctorsSchedule doctorsSchedule) { context.DoctorsSchedule.Add(doctorsSchedule); context.SaveChanges(); return(doctorsSchedule); ; }