public WrapData_Context(Data_Context DbContext) { if (DbContext is null) { throw new NullReferenceException("DbContext can't be null"); } _Context = DbContext; // Need to make sure the data is accessed so it is loaded to the local ObservableCollections DbContext.Users.ToList(); _Users = DbContext.Users; DbContext.Others.ToList(); _Others = DbContext.Others; }
public IData_InMemoryContext Create() { var context = new Data_Context(); return(new WrapData_Context(context)); }