/// <summary> /// Load your modules or register your services here /// </summary> /// <param name="kernel">The kernel.</param> private static void RegisterServices(IKernel kernel) { kernel.Bind<string>() .ToMethod(f => #pragma warning disable 0618 //disable obsolete warning as this is the ONLY place this method should be used in the application ProjectDb.Adapter.EfExtensions.CreateConnectionString( #pragma warning restore 0618 "data source=databaseSource;initial catalog=YourDbName;integrated security=True;multipleactiveresultsets=True;App=EntityFramework")) .Named("efString"); kernel.Bind(typeof(Project.Shared.Behaviors.IRepository<>)) .To<ProjectDb.Adapter.DEVEntities>() .InThreadScope() .WithConstructorArgument("connectionString",kernel.Get<string>("efString")); }
When Abstractions Break
1 week ago
Hey its Sayed Ibrahim Hashimi, I just accepted your pull request on github, wanted to chat with you quickly. Couldn't find your email anywhere can you send me an email: sayed.hashimi@gmail.com.
ReplyDeleteThanks,
Sayed Ibrahim Hashimi