Exemple #1
0
        public List <ViewClassDetail> GetClassDetail(string whereStr, int page, int pagesize, out int count)
        {
            List <ClassDetail>     list  = _repository.GetClassDetail(whereStr, page, pagesize, out count);
            List <ViewClassDetail> model = new List <ViewClassDetail>();

            foreach (var item in list)
            {
                model.Add(ViewClassDetail.ToViewModel(item));
            }
            return(model);
        }
Exemple #2
0
        public ViewClassDetail Add(ViewClassDetail entity)
        {
            ClassDetail model = _repository.Add(ViewClassDetail.ToEntity(entity));

            return(ViewClassDetail.ToViewModel(model));
        }