public async Task <CommonResponce> GetClassroomBySubjectID(int SubjectID) { bool isValid = true; var oClassroom = await _DBClassroomRepository.GetClassroomBySubjectID(SubjectID); if (oClassroom == null) { isValid = false; } CommonResponce result = new CommonResponce { Stat = isValid, StatusMsg = (isValid ? "" : "Invalid Subject Id"), StatusObj = oClassroom }; return(result); }