public List <CustomerOrderDto> GetAll() { var customerOrders = _repo.GetAll(); var customerOrdersModels = Mapper.Map <List <CustomerOrder>, List <CustomerOrderDto> >(customerOrders); return(customerOrdersModels); }
public ActionResult ListAllOrders() { CustomerOrderRepository cor = new CustomerOrderRepository(ConstantUtil.MyConnectionString); List <CustomerOrder> customerOrders = cor.GetAll(); return(View(customerOrders)); }