Kaffeplaneten.BLL.ProductBLL.getAllProducts C# (CSharp) Method

getAllProducts() public method

public getAllProducts ( ) : List
return List
        public List<ProductModel> getAllProducts()
        {
            return _productDAL.getAllProducts();
        }

Usage Example

Example #1
0
 public static void addProducts()
 {
     var _logging = new LoggingBLL();
     _logging.logToDatabase("Startet datacreator.");
     try
     {
         var products = new ProductBLL();
         if (products.getAllProducts().Count != 0)
             return;
         addProduct(createAfterDinnerBlend());
         addProduct(createAstorLibano());
         addProduct(createBrazillianBlend());
         addProduct(createCafedeParis());
         addProduct(createChocoVanilje());
         addProduct(createCostaRicanTarrazu());
         addProduct(createEtiopiskMokka());
         addProduct(createExecutiveBlend());
         addProduct(createIndianMysore());
         addProduct(createIrishCream());
         addProduct(createKoffeinfriEspresso());
         addProduct(createKoffeinfriKaffe());
         addProduct(createMayfairBlend());
         addProduct(createMexicanCoffee());
         addProduct(createNutCream());
         addProduct(createOldBrownJava());
         addProduct(createPrimeHonduras());
     }
     catch (Exception ex)
     {
         _logging.logToDatabase(ex);
     }
 }