コード例 #1
0
        public IProductManagementService ResolveProductManagementService()
        {
            string connectionString =
                ConfigurationManager.ConnectionStrings
                ["CommerceObjectContext"].ConnectionString;

            ProductRepository repository =
                new SqlProductRepository(connectionString);

            IContractMapper mapper = new ContractMapper();

            return(new ProductManagementService(repository,
                                                mapper));
        }
コード例 #2
0
        public IProductManagementService ResolveProductManagementService()
        {
            string connectionString =
                ConfigurationManager.ConnectionStrings
                ["CommerceObjectContext"].ConnectionString;

            ProductRepository repository =
                new SqlProductRepository(connectionString);

            IContractMapper mapper = new ContractMapper();

            return new ProductManagementService(repository, 
                mapper);
        }