0
priteshsanipara created
I have Job helper class. I need to call it from static class. How to I call SendNotifications() from other class. How to created the object of JobHelper class.
public class JobHelper : ITransientDependency { private readonly ILogger Logger; private readonly IAppUserService _appUserService;
public JobHelper(ILogger logger, IAppUserService appUserService)
{
Logger = logger;
_appUserService = appUserService;
}
public async Task SendNotifications(CreateNotificationsInput notificaton) { var users = await _appUserService.GetUsersForNotification(input); }
}
1 Answer(s)
-
0
Hi,
You can resolve your class directly using IocManager. For example:
IocManager.Instance.IocContainer.Resolve<JobHelper>();