public async Task <ActionResult> Create(CustomerTagViewModel model) { try { if (ModelState.IsValid) { var item = await _businessManager.CreateCustomerTag(_mapper.Map <CustomerTagDto>(model)); if (item == null) { return(BadRequest()); } return(RedirectToAction(nameof(Index))); } } catch (Exception er) { _logger.LogError(er, er.Message); } return(View(model)); }