public IHttpResponse Profile() { ProfileViewModel viewModel = new ProfileViewModel(); viewModel.Receipts = receiptsService.GetUserReceipts(this.GetUserId()); return(this.View(viewModel)); }
public IActionResult Index() { var receipts = receiptsService.GetUserReceipts(this.User.Username) .Select(r => new ReceiptViewModel() { Fee = r.Fee, Id = r.Id, IssuedOn = r.IssuedOn.ToString("dd/MM/yyyy HH:mm"), RecipientName = r.Recipient.Username }) .ToList(); return(View(receipts)); }