I've just upgraded from 0.6.x to 0.11, and hit a snag with my Module not being loaded.
I image it's related to this issue: <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/729">https://github.com/aspnetboilerplate/as ... issues/729</a>, but I just can't seem to see how to fix it. The Documentation looks the same as to what is was before: <a class="postlink" href="http://www.aspnetboilerplate.com/Pages/Documents/Module-System">http://www.aspnetboilerplate.com/Pages/ ... ule-System</a>
Here's a snippet of the Module code:
using Abp.EntityFramework;
using Abp.Modules;
namespace MyApp.DataMigration {
[DependsOn(typeof(MyAppCoreModule), typeof(MyAppDataModule), typeof(AbpEntityFrameworkModule))]
public class Migrate : AbpModule
{
public override void Initialize()
{
IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());
}
public override void PostInitialize()
{
var DB = IocManager.Resolve<MyAppDbContext>();
ImportData(DB);
}
}
}
Any help is appreciated!
6 Answer(s)
-
0
have you seen this: <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/1167#issuecomment-229988957">https://github.com/aspnetboilerplate/as ... -229988957</a> and this blog post: <a class="postlink" href="http://volosoft.com/asp-net-boilerplate-v0-10-0-has-been-released/">http://volosoft.com/asp-net-boilerplate ... -released/</a>
-
0
Hi hikalkan,
I have seen the git issue (not the blog post), but I'm still slightly confused as to how I now need to get modules loaded.
Do I just call AbpBootstrapper.Create<Migrate>(); in another Startup Module?
Or do I need to make something depend on my 'Migrate' module?
-
0
As I understand this is not a web application? If so, you should use new AbpBootstrapper() in somewhere. Just change it to AbpBootstrapper.Create<Migrate>().
-
0
In the EntityFramework project, I've just added this 'Migrate' class in there. I haven't used AbpBootsrapper before, I wasn't sure if it's a new thing I need to use to include this module.
-
0
No need to use it directly for web apps, never mind. But.. I still did not understand why you added a Migrator module? You have already MyAppDataModule in same assembly.
-
0
It's for migrating data into the old system, the file is around 3,000+ lines long! It will also eventually be removed, it just keeps it out of the way for when we need it :)
I think what I may need to do then, is remove this as a module and call the function from MyAppDataModule