예제 #1
0
        public ViewViewComponentResult Invoke()
        {
            var classTypeService = _classTypeService.GetAll();
            var model            = (from cT in classTypeService
                                    select new ClassTypeListVM
            {
                Id = cT.Id,
                Type = cT.Type
            }).ToList();

            return(View(model));
        }
예제 #2
0
 public async Task <ActionResponse <List <ClassTypeDto> > > GetAll()
 {
     return(await classTypeService.GetAll());
 }
 public async Task <IEnumerable <ClassTypeViewModel> > Get()
 {
     return((await _classTypeService.GetAll()).Select(ur => ur.ToViewModel()));
 }