Config dependencies through AppDependencies.Json config file
PM> Install-Package IocServiceStack.Config
{
"AppDependencies": {
"Name": "BusinessServices",
"Modules": [
"App.Customer.BusinessService",
"App.Admin.BusinessService",
],
"Dependencies": {
"Name": "Data",
"Modules": [
"App.DataService",
]
}
},
"SharedDependencies" : {
"Modules": [
"SharedImplementationLib"
]
},
"StrictMode": true,
"Addition": [
{"Module": "CustomerDiscount"}
]
}
using IocServiceStack;
using IocServiceStack.Config;
/* Simple configuration */
IocContainer container = IocServiceStackConfig.Configure();
// You can use container object to add or replace new extensions
using IocServiceStack;
using IocServiceStack.Config;
/* This configuration method gives little more control to use config object */
IocServicelet.Configure(config => config.ConfigFromFile());
using IocServiceStack;
using IocServiceStack.Config;
/* This configuration method gives more control to use config object */
IocServicelet.Configure(config => {
config.AddServices(service => {
service.ConfigFromFile();
service.StrictMode = true;
};
});