public VisitRepository(ContextType contextType)
        {
            switch (contextType)
            {
            case ContextType.Database: this.context = new VistSQLContext(); break;

            case ContextType.Test: this.context = new VistTestContext(); break;
            }
        }
 /// <summary>
 /// Initializes a new instance of the VisitRepository class.
 /// This constructor creates an instance of a Visit repository with the corresponding 
 /// interface as a parameter
 /// </summary>
 /// <param name="context">IVisitContext type context parameter</param>
 public VisitRepository(IVisitContext context)
 {
     this.context = context;
 }
Beispiel #3
0
 public VisitViewModel(IVisitContext context)
 {
     Visits   = new ObservableCollection <Visit>();
     _context = context;
 }