public ActionResult Search(string search) { var request = new Person_Request() { SearchCriteria = search }; var result = service.GetAll(request); return(View(result.Items.Cast <Person_View>())); }
public void GetAll_Test() { IEnumerable <Person_View> data = null; using (IPerson_Service service = API.Container.GetInstance <IPerson_Service>()) { var response = service.GetAll(new Person_Request()); data = response.Items.ToList(); } Assert.IsNotNull(data); Assert.IsInstanceOfType(data, typeof(IEnumerable <Person_View>)); Assert.IsTrue(data.Count() > 0); data.ToList().ForEach(x => Assert.IsNotNull(x.Department)); }