private BrandItemEntity Create(BrandInfo brandInfo, List <BrandItemEntity> entitiesToInsert = null) { BrandItemEntity brand = LoadAssembler.Assemble(brandInfo); brandRepository.Add(brand); entitiesToInsert?.Add(brand); return(brand); }
private CatalogItemEntity Create(CatalogInfo catalogInfo) { BrandItemEntity brandItem = GetBrandWithLoad(catalogInfo.BrandId); DirectoryEntity directory = GetDirectoryWithLoad(catalogInfo.DirectoryId); List <PhotoItemEntity> photos = GetPhotosWithLoad(catalogInfo.Photos); CatalogItemEntity entity = LoadAssembler.Assemble(catalogInfo, brandItem, photos, directory); return(entity); }
private DirectoryEntity Create(DirectoryInfo directoryInfo, List <DirectoryInfo> cacheDirectoryInfos, List <DirectoryEntity> cacheDirectoryEntities, List <DirectoryEntity> entitiesToInsert) { DirectoryEntity directory = null; if (directoryInfo != null) { directory = LoadAssembler.Assemble(directoryInfo, null, new List <DirectoryEntity>()); directoryRepository.Add(directory); entitiesToInsert.Add(directory); cacheDirectoryEntities.Add(directory); directory.Parent = GetDirectoryWithLoad(directoryInfo.Parent, cacheDirectoryInfos, cacheDirectoryEntities, entitiesToInsert); } return(directory); }
private PhotoItemEntity Create(PhotoInfo photoInfo) { PhotoItemEntity entity = LoadAssembler.Assemble(photoInfo); return(entity); }