public IEnumerable <PaymentType> GetPaymentTypes() { var repo = new PaymentTypeRepository(); var paymentTypes = repo.GetAllPaymentTypes(); return(paymentTypes); }
// GET: Home public ActionResult Index() { CustomerRepository objCustomerRepository = new CustomerRepository(); ItemRepository objItemRepository = new ItemRepository(); PaymentTypeRepository objPaymentTypeRepository = new PaymentTypeRepository(); var objMultipleModels = new Tuple <IEnumerable <SelectListItem>, IEnumerable <SelectListItem>, IEnumerable <SelectListItem> > (objCustomerRepository.GetAllCustomers(), objItemRepository.GetAllItems(), objPaymentTypeRepository.GetAllPaymentTypes()); return(View(objMultipleModels)); }
// GET: Home public ActionResult Index() { CustomerRepository customerRepo = new CustomerRepository(); ItemRepository itemRepo = new ItemRepository(); PaymentTypeRepository paymentTypeRepo = new PaymentTypeRepository(); var objMultipleObjects = new Tuple <IEnumerable <SelectListItem>, IEnumerable <SelectListItem>, IEnumerable <SelectListItem> > (customerRepo.GetAllCustomers(), itemRepo.GetAllItems(), paymentTypeRepo.GetAllPaymentTypes()); return(View(objMultipleObjects)); }
public IActionResult GetAll() { var allPaymentTypes = _repo.GetAllPaymentTypes(); return(Ok(allPaymentTypes)); }
public IEnumerable <PaymentType> GetAll() { return(_repo.GetAllPaymentTypes()); }
public IEnumerable <PaymentType> GetAll() { var repo = new PaymentTypeRepository(); return(repo.GetAllPaymentTypes()); }