Esempio n. 1
0
        public void CanDetectContact()
        {
            var repo  = new AccountRepositoryADO();
            var found = repo.IsContact("11111111-1111-1111-1111-111111111111", 1);

            Assert.IsTrue(found);

            found = repo.IsContact("11111111-1111-1111-1111-111111111111", 99);
            Assert.IsFalse(found);
        }
Esempio n. 2
0
        public IHttpActionResult CheckContact(string userId, int listingId)
        {
            var repo = new AccountRepositoryADO();

            try
            {
                var result = repo.IsContact(userId, listingId);
                return(Ok(result));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }