Пример #1
0
        public void Delete(object id)
        {
            //LoggerFactory.CreateLog().Start();
            var committed = 0;

            try
            {
                //if (session != null)
                //    _repositoryPassword.UnitOfWork.SetConnectionDb(session.ConnectionString);

                if (id == null)
                {
                    throw new ArgumentNullException("id");
                }

                // Domain Services?
                _repositoryPassword.Delete(id);
                committed = _unitOfWorkAsync.SaveChanges();
            }
            catch (Exception ex)
            {
                //LoggerFactory.CreateLog().Error(ex);
            }

            //LoggerFactory.CreateLog().Stop();
            //_repositoryPassword.Delete(id);
            //return committed > 0;
            return;
        }
        public IActionResult Delete(int id)
        {
            if (sitesettings.allowDeleteItem)
            {
                password_repo.Delete(id);
            }

            return(RedirectToAction("Index", "Vault"));
        }