예제 #1
0
        // GET: Measure
        public JsonResult GetAllCustomers()
        {
            var             partyRepo = new PartyRepository();
            List <Customer> customers = partyRepo.GetAllCustomers();

            List <CustomerViewModel> lstCustomerViewModel = new List <CustomerViewModel>();

            lstCustomerViewModel = Mapper.Map <List <Customer>, List <CustomerViewModel> >(customers);

            return(Json(lstCustomerViewModel, JsonRequestBehavior.AllowGet));
        }