public void Delete <TEntity>(TEntity entity) where TEntity : class { if (OMSContext.Entry(entity).State == EntityState.Detached) { OMSContext.Attach(entity); } OMSContext.Remove(entity); }
public void Dispose() { _omsContext.Dispose(); _omsContext = null; }
public DbAccessor(OMSContext omsContext, IServiceProvider serviceProvider) { _omsContext = omsContext; _rootProvider = serviceProvider; }