public async Task <ActionResult> MyOnlinePayments() { List <OnlinePaymentModel> lmd = new List <OnlinePaymentModel>(); var user = await UserManager.FindByIdAsync(User.Identity.GetUserId()); if (user != null) { DateTimeFormatInfo format = new DateTimeFormatInfo(); format.ShortDatePattern = "mm/dd/yyyy"; Connection.Connection con = new Connection.Connection(); DataSet ds = new DataSet(); ds = con.MyOnlinePaymentsData(User.Identity.GetUserId()); foreach (DataRow dr in ds.Tables[0].Rows) { lmd.Add(new OnlinePaymentModel { Do_Date = Convert.ToDateTime(dr["Do_Date"]), DoR_Amount = Convert.ToInt32(dr["DoR_Amount"]), Do_Id = Convert.ToInt32(dr["Do_Id"]), Us_Name = dr["Us_Name"].ToString(), Us_LName = dr["Us_LName"].ToString() }); } } return(View(lmd)); }