I have the following ISampleInterface interface
public interface ISampleInterface
{
bool sampleMethod(string _txt);
}
So that interface I implemented like this,
public Class SampleInterface : BaseEntity<Sample>, ISampleInterface
{
IContext _context;
public SampleInterface (IContext context)
: base(context)
{
_context = context;
}
public bool sampleMethod(string _txt)
{
return true;
}
}
so from my main static method how to call this sampleMethod, without invoking SampleInterface class
my Service class tight to an entity, which is "Sample", so I just want to know, without invoke Service class, can call this method(sampleMethod) via ISampleInterface
public static void main(String[] args)
{
}
Exact issue I’m facing, I have batchjob and web project, web project i can invoke this method via IOC addictive, also i want to invoke same method in batchjob, i cant it’s because of batchjob’s main method is static method