Beispiel #1
0
        public virtual ApiTeacherResponseModel MapBOToModel(
            BOTeacher boTeacher)
        {
            var model = new ApiTeacherResponseModel();

            model.SetProperties(boTeacher.Id, boTeacher.Birthday, boTeacher.Email, boTeacher.FirstName, boTeacher.LastName, boTeacher.Phone, boTeacher.StudioId);

            return(model);
        }
Beispiel #2
0
        public virtual BOTeacher MapEFToBO(
            Teacher ef)
        {
            var bo = new BOTeacher();

            bo.SetProperties(
                ef.Id,
                ef.Birthday,
                ef.Email,
                ef.FirstName,
                ef.LastName,
                ef.Phone,
                ef.StudioId);
            return(bo);
        }
Beispiel #3
0
        public virtual Teacher MapBOToEF(
            BOTeacher bo)
        {
            Teacher efTeacher = new Teacher();

            efTeacher.SetProperties(
                bo.Birthday,
                bo.Email,
                bo.FirstName,
                bo.Id,
                bo.LastName,
                bo.Phone,
                bo.StudioId);
            return(efTeacher);
        }
Beispiel #4
0
        public virtual BOTeacher MapModelToBO(
            int id,
            ApiTeacherRequestModel model
            )
        {
            BOTeacher boTeacher = new BOTeacher();

            boTeacher.SetProperties(
                id,
                model.Birthday,
                model.Email,
                model.FirstName,
                model.LastName,
                model.Phone,
                model.StudioId);
            return(boTeacher);
        }