public ActionResult AddCustomer(CustomerModel model) { _customerServices = new CustomerServices(); if (_customerServices.LoginExists(model.Login) != 0) { ModelState.AddModelError("Login", "This login already exists"); } else if (_customerServices.EmailExists(model.Email) != 0) { ModelState.AddModelError("Email", "This email already in use"); } else { _customerServices.InsertCustomer(model); return(RedirectToAction("AddCustomer")); } return(View(model)); }