Exemple #1
0
        public async Task <ApiResponse <IEnumerable <Subject> > > GetAllSubjects()
        {
            var response = new ApiResponse <IEnumerable <Subject> >();
            IEnumerable <Subject> subject = await _subjectRepository.GetAllAsyn();

            if (subject == null)
            {
                response.Success = false;
                return(response);
            }
            response.Success = true;
            response.Data    = subject;
            return(response);
        }