How to make this code fit into the base class I have lots of classes that inherit from abstract base class, which has abstract method

public class BaseClass&lt;T&gt;
{
    protected abstract void GetItems();
}


each subclass have almost the same implementation

protected override void GetItems()
{
    // some preparation code here which is the same for all sublcasses

    // calls async method that handles the result in anonymous method
    // method name is different for each of the subclass that implements it
    _model.GetXXXAsync(a =&gt;
    {
        // same code here for all sublclasses
    });
}


So, basically, the difference is only in the GetXXXAsync method. This is the method signature:

void GetXXXAsync(Action&lt;EntityResultArgs&lt;T&gt;&gt; operationCompleted);


WHat would be the best way to refactor this code to place it in a base class, to avoud repeating 30 lines of code in each subclass, while changing only the method name and T type?
You can create an abstract method that will wrap the GetXXXAsync() method:

public class BaseClass&lt;T&gt;
{
    protected void Getitems()
    {
        // some preparation code here which is the same for all sublcasses

        GetItemsInternal(a =&gt;
        {
            // same code here for all sublclasses
        });
    }

    // probably needs a better name
    protected abstract void GetItemsInternal(Action&lt;EntityResultArgs&lt;T&gt;&gt; operationComplete);
}

public class DerivedClass : BaseClass&lt;SomeType&gt;
{
    protected override void GetItemsInternal(Action&lt;EntityResultArgs&lt;SomeType&gt;&gt; operationComplete)
    {
        _model.GetXXXAsync(operationComplete);
    }
}