Example #1
0
        /// <summary>
        /// New instance if needed
        /// </summary>
        /// <returns></returns>
        public static IrrigationAdvisorContext Instance()
        {
            if (_instance == null)
            {
                _instance = new IrrigationAdvisorContext();
            }

            return(_instance);
        }
Example #2
0
 /// <summary>
 /// New instance, so new context to refresh from database.
 /// </summary>
 /// <returns></returns>
 public static IrrigationAdvisorContext Refresh()
 {
     return(_instance = new IrrigationAdvisorContext());
 }