internal VaultKeep Delete(int id, string UserId) { VaultKeep found = _repo.Get(id); if (found.UserId != UserId) { throw new UnauthorizedAccessException("Invalid Request"); } if (_repo.Delete(id)) { return found; } throw new Exception("Something went terribly wrong"); }
public IEnumerable <VaultKeep> Get(int vaultId, string userId) // NOTE that _vs and _as have already validated parameters { // Get the list of VaultKeeps from _repo IEnumerable <VaultKeep> vKeeps = _repo.Get(vaultId, userId); if (vKeeps == null) { throw new Exception("Invalid Operation"); } // Get all of the Keeps on that list from _kRepo IEnumerable <Keep> keeps = _kRepo.GetKeepsInVault(vKeeps); if (keeps == null) { throw new Exception("Invalid Operation"); } return(vKeeps); }
public IEnumerable <VaultKeep> Get() { return(_repo.Get()); }
internal IEnumerable <VaultKeepViewModel> Get(int vaultId, string userId) { return(_repo.Get(vaultId, userId)); }
public IEnumerable <VaultKeeps> Get(string userId, int vaultId) { return(_vkr.Get(userId, vaultId)); }
internal IEnumerable <VaultKeep> Get() { return(_repo.Get()); }
public IEnumerable <VaultKeep> Get(string userId) { return(_repo.Get(userId)); }
public IEnumerable <Keep> Get(int vaultId, string userId) { return(_repo.Get(vaultId, userId)); }
internal int Get(int vaultid, int keepid) { int vkid = _repo.Get(vaultid, keepid); return(vkid); }
internal IEnumerable <VaultKeep> Get(string userId) { { return(_repo.Get(userId)); } }
public IEnumerable <VaultKeeps> Get() { return(_vkr.Get()); }