Exemple #1
0
        /// <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);
        }
Exemple #2
0
 /// <summary>
 /// Recarrega o contexto, forçando uma nova instancia do banco de dados
 /// </summary>
 public static void ReloadContext()
 {
     _context = null;
 }