We are using repository pattern in our mvc project. But I'm unable to implement service in quartz jobs. Here is the code;
[DisallowConcurrentExecution]
public class DeleteContentsJob : IJob
{
private readonly IAttachmentService attachmentService;
public DeleteContentsJob(IAttachmentService attachmentService)
{
this.attachmentService = attachmentService;
}
public void Execute(IJobExecutionContext context)
{
var contentFiles = attachmentService.GetMany(cz, content.Id);
If I wrote this code, job doesnt fire. How can I call attachmentService.GetMany without problem?
Aucun commentaire:
Enregistrer un commentaire