public void InsertOrUpdate(ViewModelSchedule vSchedule) { try { _iScheduleRepository.InsertOrUpdate(Mapper.Map <ViewModelSchedule, Schedule>(vSchedule)); _iScheduleRepository.Save(); } catch (Exception e) { } }
public ViewModelSchedule Delete(ViewModelSchedule vSchedule) { try { _iScheduleRepository.Delete(vSchedule.Id); _iScheduleRepository.Save(); return(vSchedule); } catch (Exception e) { return(null); } }
public void AddSchedule(ViewModelSchedule vSchedule) { _iScheduleRepository.InsertOrUpdate(Mapper.Map <ViewModelSchedule, Schedule>(vSchedule)); _iScheduleRepository.Save(); }