예제 #1
0
        public Keep Create(VaultKeep vaultKeep)
        {
            VaultKeep check = _repo.Check(vaultKeep);

            if (check == null)
            {
                bool isCreated = _repo.Create(vaultKeep);
                if (isCreated)
                {
                    return(_keepsService.increaseKeepCount(vaultKeep.keepId));
                }
            }
            throw new Exception("could not add to vault, have you already added it?");
        }