Exemple #1
0
        public async Task <ActionResult> Create(TypeCreateEditVM model)
        {
            var typeDTO = _automapper.Map <TypeDTO>(model);

            if (await _typeService.CreateAsync(typeDTO) == false)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest, "Create error"));
            }

            return(RedirectToAction("Index"));
        }