public IActionResult AddNewAccount(TblActor account) { try { var result = _accRepo.AddNewActor(account); if (result == true) { return(Ok(result)); } } catch (DbUpdateException) { if (AccountExists(account.Username)) { return(Conflict()); } else { throw; } } return(BadRequest()); }