Good day,
I would like to inject a service to HangFire job. How to properly do it ? I have following code: Global.asax:
_container = new WindsorContainer();
_container.Register(Castle.MicroKernel.Registration.Component.For<IListingImageAppService().ImplementedBy(typeof(ListingImageAppService)).LifestyleSingleton());
JobActivator.Current = new WindsorJobActivator(_container.Kernel);
My JobBundle config:
WindsorContainer con = new WindsorContainer();
ImagesImportJob job = new ImagesImportJob(con.Resolve<ListingImageAppService>());
RecurringJob.AddOrUpdate("JobId", () => job.ImportImages(), Cron.Daily);
And my HangFire Job:
public class ImagesImportJob
{
private readonly ListingImageAppService _srv;
public ImagesImportJob(ListingImageAppService srv) { _srv = srv; }
public void ImportImages()
{
///
}
}
Good day,
I would like to tie ApplicationLanguage with other entities.
For example, I want to create many-to-many relatioship between ApplicationLanguage and my custom Region class.
The problem is that ApplicationLanguage class in a separate solution and, therefore I can not modify it.
Is there a way to add navigation property to the ApplicationLanguage class ?
Pavel