public static List <PaymentDTO> GetStudentPaymentsList(int studentId) { using (Gymnastics_Studio_DataEntities GSDE = new Gymnastics_Studio_DataEntities()) { List <Payment> paymentList = new List <Payment>(); paymentList = GSDE.Payments.Where(x => x.StudentId == studentId).ToList(); return(PaymentDTO.ConvertListToDTO(paymentList)); } }
public static List <PaymentDTO> getPaymentList() { using (Gymnastics_Studio_DataEntities GSDE = new Gymnastics_Studio_DataEntities()) { List <Payment> PaymentList = new List <Payment>(); PaymentList = GSDE.Payments.ToList(); return(PaymentDTO.ConvertListToDTO(PaymentList)); } }