Beispiel #1
0
 public ClothesMainEntityConverter(IGenderEntityConverter genderEntityConverter,
                                   IClothesTypeEntityConverter clothesTypeEntityConverter,
                                   IColorClothesEntityConverter colorClothesEntityConverter,
                                   ISizeGroupMainEntityConverter sizeGroupMainEntityConverter,
                                   IClothesImageEntityConverter clothesImageEntityConverter)
 {
     _genderEntityConverter        = genderEntityConverter;
     _clothesTypeEntityConverter   = clothesTypeEntityConverter;
     _colorClothesEntityConverter  = colorClothesEntityConverter;
     _sizeGroupMainEntityConverter = sizeGroupMainEntityConverter;
     _clothesImageEntityConverter  = clothesImageEntityConverter;
 }
 public ClothesDetailEntityConverter(IColorClothesEntityConverter colorClothesEntityConverter,
                                     ISizeGroupMainEntityConverter sizeGroupMainEntityConverter)
 {
     _colorClothesEntityConverter  = colorClothesEntityConverter;
     _sizeGroupMainEntityConverter = sizeGroupMainEntityConverter;
 }
Beispiel #3
0
 /// <summary>
 /// Преобразовать связующую сущность в коллекцию размеров
 /// </summary>
 public static IResultCollection <ISizeGroupMainDomain> SizeGroupFromComposite(IEnumerable <ClothesSizeGroupCompositeEntity>?clothesSizeCompositeEntities,
                                                                               ISizeGroupMainEntityConverter sizeGroupMainEntityConverter) =>
 clothesSizeCompositeEntities.
 ToResultValueNullCheck(ConverterErrors.ValueNotFoundError(nameof(clothesSizeCompositeEntities))).
 ResultValueBindOkToCollection(GetColorClothes).
 ResultCollectionBindOk(sizeGroupMainEntityConverter.FromEntities);
Beispiel #4
0
 /// <summary>
 /// Преобразовать размеры в связующую сущность
 /// </summary>
 public static IEnumerable <ClothesSizeGroupCompositeEntity> SizeGroupToComposite(IEnumerable <ISizeGroupMainDomain> sizeGroupMainDomains,
                                                                                  int clothesId,
                                                                                  ISizeGroupMainEntityConverter sizeGroupMainEntityConverter) =>
 sizeGroupMainEntityConverter.ToEntities(sizeGroupMainDomains).
 Select(sizeGroupEntity => new ClothesSizeGroupCompositeEntity(clothesId, sizeGroupEntity.Id, null, null));
 public SizeGroupDatabaseService(IBoutiqueDatabase boutiqueDatabase,
                                 ISizeGroupDatabaseValidateService sizeGroupDatabaseValidateService,
                                 ISizeGroupMainEntityConverter sizeGroupEntityConverter)
     : base(boutiqueDatabase, boutiqueDatabase.SizeGroupTable, sizeGroupDatabaseValidateService, sizeGroupEntityConverter)
 {
 }