I have a service class called ClientService, the service class is called using an interface IClientService. The service class simply does CRUD methods for the DbSet<Client> in my context class.  In my service class constructor I have:private MyContext context;public ClientService(){    context = new MyContext();}I then have a void in the ClientService class that can be called from the IClientService interface called Save() that does this:public void Save(){    context.SaveChanges();    context.Dispose();    context = new MyContext();}Is this safe or even necessary or am I good simply saying context.SaveChanges(); in the Save() void?
Safe DbContext Disposal
c#;entity framework;asp.net mvc 4;interface
You shouldn't need to call Dispose and new up another context in the Save method. SaveChanges should be good enough.  I would recommend you make ClientService IDisposable and when that class disposes then dispose of the context as well.Update from commentto implement IDisposable on the IClientService public interface IClientService : IDisposableThe will now require a Dispose method on any class that implements IClientService.  In the dispose method you should call the dispose method of the context.