public IActionResult Create()
        {
            var departaments = _departamentService.GetAll();
            var viewModel    = new SellerFormViewModel {
                Departaments = departaments
            };

            return(View(viewModel));
        }
示例#2
0
        public async Task <IHttpActionResult> GetAll()
        {
            var departaments = await departamentService.GetAll();

            var departamentsDTO = departaments.Select(x => mapper.Map <DepartamentDTO>(x));

            return(Ok(departamentsDTO));
        }