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); }
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); }
public IEnumerable <Models.DomainModels.Inquiry> GetAllInquiries() { return(inquiryRepository.GetAll().ToList()); }