public async Task <Guid> Create(DiseaseToSympthomDto diseaseToSympthomDto)
        {
            using (var uow = UnitOfWorkProvider.Create())
            {
                var guid = diseaseToSympthomService.Create(diseaseToSympthomDto.DiseaseDto.Id, diseaseToSympthomDto.SympthomDto.Id);
                await uow.Commit();

                return(guid);
            }
        }
示例#2
0
        private async Task <Guid> MatchDiseaseAndSypthoms(Guid diseaseGuid, List <Guid> existingSympthomGuids)
        {
            Guid id = Guid.Empty;

            foreach (var guid in existingSympthomGuids)
            {
                DiseaseToSympthomDto diseaseToSympthom = new DiseaseToSympthomDto {
                    DiseaseDto = await DiseaseFacade.GetDiseaseAsync(diseaseGuid), SympthomDto = await SympthomFacade.GetSympthomAsync(guid)
                };
                id = await DiseaseAndSympthomFacade.Create(diseaseToSympthom);
            }
            return(id);
        }