示例#1
0
        private GuestRoutineInfo ConvertToInfo(KrswModel model)
        {
            if (model == null)
            {
                return(null);
            }

            GuestRoutineInfo info = AutoMapper.Mapper.Map <KrswModel, GuestRoutineInfo>(model);

            return(info);
        }
示例#2
0
        private KrswModel ConvertToModel(GuestRoutineInfo info)
        {
            if (info != null)
            {
                return(null);
            }

            KrswModel model = AutoMapper.Mapper.Map <GuestRoutineInfo, KrswModel>(info);

            return(model);
        }
示例#3
0
        private List <GuestRoutineInfo> ConvertToInfoList(IEnumerable <KrswModel> modelList)
        {
            List <GuestRoutineInfo> list = new List <GuestRoutineInfo>();

            foreach (var item in modelList)
            {
                GuestRoutineInfo info = ConvertToInfo(item);
                list.Add(info);
            }
            return(list);
        }