示例#1
0
        public virtual ApiRateResponseModel MapBOToModel(
            BORate boRate)
        {
            var model = new ApiRateResponseModel();

            model.SetProperties(boRate.Id, boRate.AmountPerMinute, boRate.TeacherId, boRate.TeacherSkillId);

            return(model);
        }
        public virtual BORate MapEFToBO(
            Rate ef)
        {
            var bo = new BORate();

            bo.SetProperties(
                ef.Id,
                ef.AmountPerMinute,
                ef.TeacherId,
                ef.TeacherSkillId);
            return(bo);
        }
        public virtual Rate MapBOToEF(
            BORate bo)
        {
            Rate efRate = new Rate();

            efRate.SetProperties(
                bo.AmountPerMinute,
                bo.Id,
                bo.TeacherId,
                bo.TeacherSkillId);
            return(efRate);
        }
示例#4
0
        public virtual BORate MapModelToBO(
            int id,
            ApiRateRequestModel model
            )
        {
            BORate boRate = new BORate();

            boRate.SetProperties(
                id,
                model.AmountPerMinute,
                model.TeacherId,
                model.TeacherSkillId);
            return(boRate);
        }