Hi,
Take a look at the code.
public class UnitedExportDbContext : DbContext, IUnitOfWork
container.RegisterType<IUnitOfWork, ReservationContext>(new ContainerControlledLifetimeManager(), new InjectionConstructor("FasterTableContext"));
Because of we register the types like following way.
<type type="UnitedExport.Data.IRepositoryInitializer, UnitedExport.Data" mapTo="UnitedExport.Data.Sql.RepositoryInitializer, UnitedExport.Data.Sql">
public virtual void Execute(ProvisioningRequestObj obj)
{"The type String cannot be constructed. You must configure the container to supply this value."}
What I need is that the dynamic not lives within config file
Take a look at the code.
public class UnitedExportDbContext : DbContext, IUnitOfWork
{
//public string connectionString="data source=.\\SQLExpress;Integrated Security=SSPI;Initial Catalog=UnitedExportDb";
public UnitedExportDbContext(string connectionString)
: base(connectionString)
{
}
With Prism I can do like the line belowcontainer.RegisterType<IUnitOfWork, ReservationContext>(new ContainerControlledLifetimeManager(), new InjectionConstructor("FasterTableContext"));
Because of we register the types like following way.
<type type="UnitedExport.Data.IRepositoryInitializer, UnitedExport.Data" mapTo="UnitedExport.Data.Sql.RepositoryInitializer, UnitedExport.Data.Sql">
<lifetime type="perRequest" />
</type>
<type type="UnitedExport.Data.IUnitOfWork, UnitedExport.Data" mapTo="UnitedExport.Data.Sql.UnitedExportDbContext, UnitedExport.Data.Sql">
<lifetime type="perRequest" />
</type>
I create the database like following code.public virtual void Execute(ProvisioningRequestObj obj)
{
var repositoryInitializer = ServiceLocator.Current.GetInstance<IRepositoryInitializer>();
repositoryInitializer.Initialize();
}
I got this error messages{"The type String cannot be constructed. You must configure the container to supply this value."}
What I need is that the dynamic not lives within config file