public VaultKeep Create(VaultKeep newVaultKeep) { var exists = _vkRepo.GetByIds(newVaultKeep.VaultId, newVaultKeep.KeepId); if (exists != null) { throw new Exception("Pic already in vault"); } _vkRepo.Create(newVaultKeep); return(newVaultKeep); }
internal object Delete(int vaultId, int keepId, string userId) { VaultKeep exists = _repo.GetByIds(vaultId, keepId, userId); if (exists == null) { throw new Exception("Invalid Id or You Did Not Create This VaultKeep"); } _repo.Delete(vaultId, keepId, userId); return("Successfully Deleted"); }