Пример #1
0
        public async Task <ApiResponse <Subject> > GetSubjectById(Guid id)
        {
            var response = new ApiResponse <Subject>();
            //Subject subject2 = _subjectRepository.GetByGuid(id);
            Subject subject = await _subjectRepository.GetByGuidAsync(id);

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