예제 #1
0
        static public ProductType GetProductType(string productType)
        {
            IProductTypeRepository repository = ProductTypeRepositoryFactory.GetProductTypeRepository();
            var allProductTypes = repository.GetProductTypes();

            return(allProductTypes.FirstOrDefault(t => t.Type.ToUpper() == productType.ToUpper()));
        }
예제 #2
0
        static public bool IsProductType(string productType)
        {
            IProductTypeRepository repository = ProductTypeRepositoryFactory.GetProductTypeRepository();
            var allProductTypes = repository.GetProductTypes();

            return(allProductTypes.Any(t => t.Type.ToUpper() == productType.ToUpper()));
        }
예제 #3
0
        public static List <ProductType> GetAllProductTypes()
        {
            IProductTypeRepository repository = ProductTypeRepositoryFactory.GetProductTypeRepository();

            return(repository.GetProductTypes());
        }