Base solution for your next web application

Activities of "daniel"

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

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.

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?

Hi, I've renamed my AppServices/Repositories to be generic, but this is the basics of the code which I'm running.

The problem is bizarre, as, as you can see, I can Create to another app services perfectly fine - There are no problems stepping into the function. It's as if the ComplexAppService isn't being correctly resolved.

I do have it working using IocManager.Instance.Resolve, so it's not a major bug for me currently, just more curiosity.

public class MyAppService : ApplicationService, IMyAppService
{
	private readonly IRepository<Thing> _thingRepository;
	private readonly IAnotherAppService _anotherAppService
	private readonly IComplexAppService _complexAppService

	public MyAppService(IRepository<Thing> thingRepository, IAnotherAppService anotherAppService, IComplexAppService complexAppService)
	{
		_thingRepository = thingRepository;
		_anotherAppService = anotherAppService;
		_complexAppService = complexAppService;
	}

	public Create(CreateInput input)
	{
		var ThingItem = _thingRepository.Get(1);
		ThingItem.Prop = true; // This updates correctly

		var AnotherId = _anotherAppService.Create(new CreateAnotherInput { Value = "Some text" }); // This will complete

		_complexAppService.Create(new CreateComplexInput { AnotherId = AnotherId }); // This fails

		var CAS = IocManager.Instance.Resolve<ComplexAppService>();
		CAS.Create(new CreateComplexInput { AnotherId = AnotherId }); // This works correctly
	}
}

I've managed to inject other AppServices to the same one too, they're all working perfectly. So, for example, in my "MyAppService", I've injected "TaskAppService", and I can call GetTasks() from there. This completes successfully.

I'm not receiving any error at all, the code will not call the function at all. It just skips over it and exits the function.

If you reject the injection method, which route should we go down? Injecting the IIocManager and resolving from there, or resolving as I did in the working example above?

Thanks for the reply! Would explain why I was getting nowhere with it.

Showing 1 to 6 of 6 entries