/// <summary> /// Obtém uma instância de ChangeXMLContext /// </summary> /// <returns>Uma instância de ChangeXMLContext</returns> public static ChangeXMLContext GetInstance() { string stringConnection = ConfigurationManager.ConnectionStrings["BrokerMessageConnectionString"].ConnectionString; if (_context == null) { _context = new ChangeXMLContext(stringConnection); } _context.Configuration.LazyLoadingEnabled = false; _context.Configuration.ProxyCreationEnabled = false; return(_context); }
/// <summary> /// Recarrega o contexto, forçando uma nova instancia do banco de dados /// </summary> public static void ReloadContext() { _context = null; }