public ActionResult New(Account account)
 {
     try
     {
         if (ModelState.IsValid)
         {
             if (account.Mail == null)
             {
                 account.Mail = "";
             }
             if (account.Role == null)
             {
                 account.Role = "";
             }
             repository.Add(account);
             repository.SaveChanges();
             return RedirectToAction("Index");
         }
     }
     catch (Exception e)
     {
         Log.Write(e);
         ModelState.AddModelError("", "Unable to save changes");
     }
     AccountNewViewModel nvm = new AccountNewViewModel() { Account = account };
     return View(nvm);
 }
 public ActionResult New()
 {
     Account account = new Account();
     AccountNewViewModel model = new AccountNewViewModel() { Account = account };
     return View(model);
 }