Exemplo n.º 1
0
        public Response <List <Inquiry> > GetAllByStatus(string status)
        {
            var response = new Response <List <Inquiry> >();

            try
            {
                response.Data    = _inquiryRepo.GetAll().Where(i => i.InquiryStatusId.ToString() == status).ToList();
                response.Success = true;
            }
            catch
            {
                response.Success = false;
            }
            return(response);
        }
Exemplo n.º 2
0
        public void AddInquiry()
        {
            Inquiry inquiry = new Inquiry()
            {
                InquiryStatusId = 1,
                Name            = "Jake",
                Phone           = "654-234-6453",
                Email           = "*****@*****.**",
                Message         = "Very Cool site"
            };

            _inquiryRepo.Add(inquiry);
            var actual = _inquiryRepo.GetAll();

            Assert.AreEqual(2, actual.Count);
        }
Exemplo n.º 3
0
 public IEnumerable <Models.DomainModels.Inquiry> GetAllInquiries()
 {
     return(inquiryRepository.GetAll().ToList());
 }