示例#1
0
        public IEnumerable <DetailTypeViewModel> GetAll()
        {
            IDetailTypeService detailTypesService = new DetailTypeService();

            var types = detailTypesService.GetAll();

            var result = types.Select(x => new DetailTypeViewModel
            {
                Id   = x.Id,
                Name = x.Name
            });

            return(result);
        }
 public DetailTypeController()
 {
     detailTypeService = new DetailTypeService();
 }