Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- What's the difference between these two StructureMap configs?
- ObjectFactory.Initialize(x =>
- {
- x.For<IBusinessRelationsContext>().Use<BusinessRelationsContext>().Ctor<string>().Is(ConfigurationManager.ConnectionStrings["BusinessRelationsContext"].ConnectionString);
- x.For<IBusinessRelationsContext>().Use(_ => new BusinessRelationsContext(ConfigurationManager.ConnectionStrings["BusinessRelationsContext"].ConnectionString));
- });
- public BusinessRelationsContext();
- public BusinessRelationsContext(string connectionString);
- public BusinessRelationsContext(EntityConnection connection);
- ObjectFactory.TryGetInstance<IBusinessRelationsContext>();
- x.For<IBusinessRelationsContext>().Use(_ => new BusinessRelationsContext(ConfigurationManager.ConnectionStrings["BusinessRelationsContext"].ConnectionString));
- x.SelectConstructor<IBusinessRelationsContext>(() => new BusinessRelationsContext(""));
Add Comment
Please, Sign In to add comment