예제 #1
0
        public async Task <HfeaForm> Create(CreateHfeaFormInput input)
        {
            var publisher = await SessionService.GetPublisherAsync();

            var hfeaClassification = input.HfeaClassification.MapTo <HfeaClassification>();

            var hfeaForm = HfeaForm.Create(
                name: input.Name,
                versionNumber: input.VersionNumber,
                formCode: input.FormCode,
                shortDescription: input.ShortDescription,
                publisher: publisher,
                hfeaFormFile: input.FormFile,
                hfeaClassification: hfeaClassification,
                hfeaDescriptionVideo: input.DescriptionVideo,
                priority: input.Priority,
                useDefaultPriority: input.UseDefaultPriority);

            await _hfeaRepository.CreateItemAsync(hfeaForm);

            return(hfeaForm);
        }