예제 #1
0
        public async Task <IEnumerable <SubjectDto> > GetAsync(CancellationToken token)
        {
            if (User.GetCountryClaim() != null)
            {
                return(null);
            }
            var query = new SubjectsTranslationQuery();

            return(await _queryBus.QueryAsync(query, token));
        }
예제 #2
0
            public async Task <IEnumerable <SubjectDto> > GetAsync(SubjectsTranslationQuery query,
                                                                   CancellationToken token)
            {
                const string sql = @"select cs.Id, cs.Name as HeName, st.NameTranslation as EnName
                                    from sb.CourseSubject cs
                                    left join sb.SubjectTranslation st
	                                    on cs.Id = st.SubjectId 
	                                    and st.LanguageId = (select Id from sb.AdminLanguage where Name = 'en')"    ;

                using (var conn = _dapperRepository.OpenConnection())
                {
                    return(await conn.QueryAsync <SubjectDto>(sql));
                }
            }
예제 #3
0
 public async Task SubjectsTranslationQuery_Ok()
 {
     var query = new SubjectsTranslationQuery();
     var _     = await _fixture.QueryBus.QueryAsync(query, default);
 }