public IActionResult All() { PaymentListModel model = new PaymentListModel() { Payments = _payments.GetAll().Select(t => new PaymentItemModel() { TenantId = t.Tenant.Id, TenantName = t.Tenant.FullName, Amount = t.Amount, Date = t.Date.ToString("dd/MM/yyyy") }) }; return(View(model)); }
public IActionResult Index() { var payments = _paymentService.GetAll() .Select(p => new PaymentViewModel { Id = p.Id, Limit = p.Limit, Amount = p.Amount, PaymentBank = p.PaymentBank, PaymentCustomer = p.PaymentCustomer, PaymentConfirm = p.PaymentConfirm, MemberId = p.MemberId, ClubName = p.Member.Club.Name }); var model = new PaymentIndexViewModel { Payments = payments }; return(View(model)); }