public IActionResult Create() { var departaments = _departamentService.GetAll(); var viewModel = new SellerFormViewModel { Departaments = departaments }; return(View(viewModel)); }
public async Task <IHttpActionResult> GetAll() { var departaments = await departamentService.GetAll(); var departamentsDTO = departaments.Select(x => mapper.Map <DepartamentDTO>(x)); return(Ok(departamentsDTO)); }