public async Task <ActionResult> PayHistoric(int?id) { if (id == null) { return(NotFound()); } var st = await stu.GetByIdAsync(id.Value); var model = new PayHistoricModel(); model.Paiements = await Pmt.GetPayHistoric(id.Value); model.Student = st.FullName; model.StudentID = st.Id; if (model == null) { return(NotFound()); } return(View(model)); }