Last post Dec 03, 2014 12:00 AM by limsy
Dec 02, 2014 04:22 PM|limsy|LINK
I'm hoping to build a MVC5 webapp using MembershipReboot and StructureMap. I've been searching for sample codes but they are either out-of-date or not a direct map (The closest I've found are on MembershipReboot with Ninject). As I'm totally new to IoC
and MVC (ASP.Net as well), I'm really lost and don't know how to start.
I already have some codes (taken from MembershipReboot samples), I just don't know how to make it work with StructureMap instead of Ninject. Or should I dump StructureMap and go for Ninject instead? (I've chosen StuctureMap because it looks easier)
I appreciate ANY help/info to help me get started. Thank you for your time.
Dec 02, 2014 05:39 PM|BrockAllen|LINK
Your question really seems to be 1) how to use structure map, and perhaps 2) how to design to use dependency injection. Those are the topics I'd suggest searching for.
Dec 02, 2014 07:11 PM|limsy|LINK
I've followed the example found here:
I'm stuck at converting this part (in Ninject): (to StructureMap)
Database.SetInitializer(new MigrateDatabaseToLatestVersion<DefaultMembershipRebootDatabase, BrockAllen.MembershipReboot.Ef.Migrations.Configuration>());
Can someone familiar with StructureMap help me?
Dec 03, 2014 12:00 AM|limsy|LINK
I've decided to forgo StructureMap and use Ninject.
It's working now. Thanks.