public ProductModelResponse GetProductModelResponse(int?productId, int?modelId) { ProductModelResponse productModelResponse = new ProductModelResponse(); if (productId != null) { productModelResponse.ProductModels = productModelRepository.LoadProductModelsByProductId((int)productId); } if (modelId != null) { productModelResponse.ProductModel = productModelRepository.Find((int)modelId); productModelResponse.ProductModelTechnicalSpec = productTechnicalSpecsRepository.LoadTechnicalSpecsByModelId((int)modelId).ToList(); } productModelResponse.TechnicalSpec = technicalSpecsRepository.GetAll().ToList(); return(productModelResponse); }
public IEnumerable <TechnicalSpec> GetAllTechnicalSpecs() { return(technicalSpecsRepository.GetAll().ToList()); }