private void Dispose(bool disposing) { if (disposing) { //free managed resources if (Context != null) { Context.Dispose(); Context = null; } } //no native resources to free }
public PrioritizerUnitOfWork(prioritizerDBEntities context) { Context = context; //sahar - sqlCE does not support commandTimeout which is different than zero. //when move back to sql server un-remark this section! /*if (context.Connection != null && context.Connection.ConnectionTimeout >= 300) * { * Context.CommandTimeout = context.Connection.ConnectionTimeout; * } * else * { * Context.CommandTimeout = 300; //TODO - get from setting * }*/ }