internal List<HistoryDetailsModel> GetHistoryDetailsForTutor(SessionHistoryRequestModel objReq) { using (var db = new WizzDataContext()) { List<HistoryDetailsModel> historyList = new List<HistoryDetailsModel>(); int userId = Convert.ToInt32(objReq.userId); var sessionList = db.usp_GetHistoryDetailsForTutor(objReq.uniqueRequestId).ToList(); int i = 1; foreach (var c in sessionList) { HistoryDetailsModel model = new HistoryDetailsModel(); model.sno = Convert.ToString(i++); model.sessionHours = c.forMinutes.ToString(); model.sessionCost = c.sessionCost.ToString(); model.homework = c.homeWork.ToString(); model.latitude = Convert.ToString(c.lat); model.longitude = Convert.ToString(c.longi); model.sessionDate = c.updatedDate.Value.ToString("dd mm yyyy"); model.sessionNotes = c.sessionNotes.ToString(); model.homework = c.homeWork.ToString(); model.paymentType = c.paymentType.ToString(); //model.u = c.uniqueRequestId; //model.profilepic = c.profilePic.ToString(); //model.tutorRating = Convert.ToString(c.tutorRating); //model.totalHours = c.TotalMinutes.ToString(); historyList.Add(model); } return historyList; } }