Esempio n. 1
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddMvc();
            services.AddCors();

            var baseApiUrl = Configuration.GetSection("ProductApi").GetSection("Url").Value;
            var apiClient  = new ApiClient(baseApiUrl);
            var products   = apiClient.GetAllProducts().Result;

            ProductsStorage.Save(products);
        }
 public ProductAttributesService(ProductsStorage storage)
 {
     _storage = storage;
 }
Esempio n. 3
0
 public ProductStatusesService(ProductsStorage storage)
 {
     _storage = storage;
 }
 public ProductsController(IConfiguration config)
 {
     _storage = new ProductsStorage(config);
 }
 public ProductCategoryChangesService(ProductsStorage storage)
 {
     _storage = storage;
 }
Esempio n. 6
0
 /// <summary>
 /// Получение коллекции [Деталей] из su73
 /// </summary>
 public static List <Product> GetDetailSu73()
 {
     return(ProductsStorage.GetDetailSu73());
 }
Esempio n. 7
0
 /// <summary>
 /// Получение коллекции [Сборочных единиц]
 /// </summary>
 public static List <Product> GetAssemblyUnits()
 {
     return(ProductsStorage.GetAssemblyUnits());
 }
Esempio n. 8
0
 /// <summary>
 /// Получение коллекции [Изделий]
 /// </summary>
 public static List <Product> GetProducts()
 {
     return(ProductsStorage.GetProducts());
 }
        /// <summary>
        /// Получение коллекции [Изделий/продукций/услуг]
        /// </summary>
        public static List <Product> GetProductsOnlyName()
        {
            var products = ProductsStorage.GetProductsOnlyName();

            return(products);
        }