Beispiel #1
0
        public virtual ApiLessonResponseModel MapBOToModel(
            BOLesson boLesson)
        {
            var model = new ApiLessonResponseModel();

            model.SetProperties(boLesson.Id, boLesson.ActualEndDate, boLesson.ActualStartDate, boLesson.BillAmount, boLesson.LessonStatusId, boLesson.ScheduledEndDate, boLesson.ScheduledStartDate, boLesson.StudentNotes, boLesson.StudioId, boLesson.TeacherNotes);

            return(model);
        }
        public virtual BOLesson MapEFToBO(
            Lesson ef)
        {
            var bo = new BOLesson();

            bo.SetProperties(
                ef.Id,
                ef.ActualEndDate,
                ef.ActualStartDate,
                ef.BillAmount,
                ef.LessonStatusId,
                ef.ScheduledEndDate,
                ef.ScheduledStartDate,
                ef.StudentNotes,
                ef.StudioId,
                ef.TeacherNotes);
            return(bo);
        }
        public virtual Lesson MapBOToEF(
            BOLesson bo)
        {
            Lesson efLesson = new Lesson();

            efLesson.SetProperties(
                bo.ActualEndDate,
                bo.ActualStartDate,
                bo.BillAmount,
                bo.Id,
                bo.LessonStatusId,
                bo.ScheduledEndDate,
                bo.ScheduledStartDate,
                bo.StudentNotes,
                bo.StudioId,
                bo.TeacherNotes);
            return(efLesson);
        }
Beispiel #4
0
        public virtual BOLesson MapModelToBO(
            int id,
            ApiLessonRequestModel model
            )
        {
            BOLesson boLesson = new BOLesson();

            boLesson.SetProperties(
                id,
                model.ActualEndDate,
                model.ActualStartDate,
                model.BillAmount,
                model.LessonStatusId,
                model.ScheduledEndDate,
                model.ScheduledStartDate,
                model.StudentNotes,
                model.StudioId,
                model.TeacherNotes);
            return(boLesson);
        }