public string Save(EnrollStudentInCourse enrollStudentInCourse) { EnrollStudentInCourse enrollStudent = GetEnrollCourses().ToList().Find(s => (s.StudentId == enrollStudentInCourse.StudentId && s.CourseId == enrollStudentInCourse.CourseId) && (s.Status)); if (enrollStudent == null) { if (studentGateway.EnrollStudentInACourse(enrollStudentInCourse) > 0) { return("Saved Successfully"); } return("Failed to save"); } return("Already Enroll in this course"); }