Базовый сервис
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Example.Data.Services
{
    public abstract class BaseService : IDisposable
    {
        protected ExampleContext context;
        protected BaseService()
        {
            context = new ExampleContext();
        }
        public void Dispose()
        {
            context.Dispose();
        }
    }
}