Пример #1
0
        public ActionResult Create(MarcaViewModel marca)
        {
            if (ModelState.IsValid)
            {
                var marcaDomain = _mapper.Map <MarcaViewModel, Marca>(marca);
                _marcaApp.Add(marcaDomain);

                return(RedirectToAction("Index"));
            }

            return(View(marca));
        }
Пример #2
0
 public IActionResult Insert([FromBody] MarcaRequestViewModel viewmodel)
 {
     return(ResponseOk(_marcaAppService.Add(viewmodel)));
 }