Esempio n. 1
0
        public WorkShiftView(WorkShift model)
        {
            Mapper.CreateMap <WorkShift, WorkShiftView>();
            Mapper.Map <WorkShift, WorkShiftView>(model, this);

            this.created = model.created.ToString().Replace('T', ' ');
            this.updated = model.updated.ToString().Replace('T', ' ');
        }
        public WorkShiftView(WorkShift model)
        {
            Mapper.CreateMap<WorkShift, WorkShiftView>();
            Mapper.Map<WorkShift, WorkShiftView>(model, this);

            this.created = model.created.ToString().Replace('T', ' ');
            this.updated = model.updated.ToString().Replace('T', ' ');
        }
Esempio n. 3
0
        public WorkShift getModel()
        {
            var model = new WorkShift();

            Mapper.CreateMap <WorkShiftView, WorkShift>();
            Mapper.Map <WorkShiftView, WorkShift>(this, model);

            return(model);
        }
        public WorkShift getModel()
        {
            var model = new WorkShift();

            Mapper.CreateMap<WorkShiftView, WorkShift>();
            Mapper.Map<WorkShiftView, WorkShift>(this, model);

            return model;
        }
 public WorkShift createWorkShift(WorkShift model)
 {
     db.workShifts.Add(model);
     db.SaveChanges();
     return model;
 }