Пример #1
0
        public ActionResult <DayAndNightSearchResViewModel> UpdateDayAndNightInfo(DayAndNightUpdateViewModel dayAndNightUpdateViewModel)
        {
            DayAndNightSearchResViewModel dayAndNightSearchResViewModel = new DayAndNightSearchResViewModel();

            dayAndNightService.UpdateIDayAndNightService(dayAndNightUpdateViewModel);
            return(Ok("更新成功"));
        }
        public void UpdateIDayAndNightService(DayAndNightUpdateViewModel dayAndNightUpdateViewModel)
        {
            var update = mapper.Map <DayAndNightUpdateViewModel, Student_DayandNight_Info>(dayAndNightUpdateViewModel);

            dayandNightRepository.Update(update);
            dayandNightRepository.SaveChanges();
        }