Hi, I have a class:
public abstract class AbstractDBConnector
{
private AdServiceDB db;
public AdServiceDB Adapter
{
get
{
if (db == null) db = new AdServiceDB();
return db;
}
}
}
and a class that inherits from it:
public class BaseDataValidator : AbstractDBConnector
{
public static bool Check()
{
var t = Adapter.Users.Where(x=>x.Id<10).ToList(); //the error is here
return true; //example
}
}
this code obviously generates an error: An object reference is required for the non-static field, method, or property Is it even possible to do a trick to use the Adapter in the static method ?