예제 #1
0
        public ActionResult Search(string search)
        {
            var request = new Person_Request()
            {
                SearchCriteria = search
            };

            var result = service.GetAll(request);

            return(View(result.Items.Cast <Person_View>()));
        }
예제 #2
0
        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));
        }