Beispiel #1
0
        /// <summary>
        /// Method to get template - SS
        /// </summary>
        /// <param name="getTemplate">query params</param>
        /// <param name="instituteId">institute id</param>
        /// <returns></returns>
        public async Task <Template> GetTemplateAsync(GetTemplateAc getTemplate, int instituteId)
        {
            var template = await _iMSDbContext.Templates.FirstOrDefaultAsync(x => x.TemplateFormat ==
                                                                             EnumHelperService.GetValueFromDescription <TemplateFormatEnum>(getTemplate.TemplateFormat) && x.InstituteId == instituteId &&
                                                                             x.TemplateFeatureType == EnumHelperService.GetValueFromDescription <TemplateFeatureEnum>(getTemplate.TemplateFeatureType) &&
                                                                             x.TemplateType == EnumHelperService.GetValueFromDescription <TemplateTypeEnum>(getTemplate.TemplateType));

            return(template);
        }
Beispiel #2
0
        public async Task <IActionResult> GetTemplateAsync([FromBody] GetTemplateAc getTemplate)
        {
            var instituteId = await GetUserCurrentSelectedInstituteIdAsync();

            return(Ok(await _templateManagementRepository.GetTemplateAsync(getTemplate, instituteId)));
        }