forked from dotnet/efcore
    
        
        - 
                Notifications
    You must be signed in to change notification settings 
- Fork 0
Design Meeting Notes: January 16, 2015
        Arthur Vickers edited this page Feb 5, 2015 
        ·
        5 revisions
      
    -  Remove constructor that takes service provider AND options. This isn't needed because the options can just be registered in the service provider.
- Update: We decided to keep this constructor because it is hard to share a service provider but use different EF providers when not using a derived context type unless this constructor is present.
 
-  Move AutoDetectChangesEnabledtoDbContext.ChangeTrackerand remove theConfigurationproperty. Future settings can be grouped where they belong and we won't have a general settings/configuration drill down.
-  Add an IEnumerableoverload to avoid needing to callToArrayall the time when calling with multiple entities.
-  Swap the return type of collection overloads to be voidto avoid needing to createEntityEntryfor each entity (you can always loop over the supplied entities and get the entry if needed). In the future we could return anIEnumerablethat lazily creates the entries if needed.
- Update: We also changed the name of the multiple entity methods to AddRange, etc. to better handle overload resolution.
-  Remove paramsoverloads and just haveIEnumerable(AddAsyncis not going to be used very much and theparamsprevents us having an optionsCancellationTokenwhich results in lots of overloads).- Update: we decided to remove AddAsync entirely
 
-  Introduce an IAccessor<TService>interface and expose this as explicit implementation ofIAccessor<ServiceProvider>
Currently provided to allow creating test doubles, but can be confusing because you have to use the other ctor to create a functional DbSet.
-  Make DbSet<TEntity>an abstract base class with default ctor that has no functionality in it. This achieves the same thing as an interface but allows breaking changes.
-  Make what's currently implemented in DbSet<TEntity>a derived class with just theDbContextctor and all the functionality.
-  DbContext.Setwill still be typed asDbSet<TEntity>but creates instances of the derived type.
- Same changes as DbContext methods
- Ensure these interfaces are explicitly implemented so they don't show up in IntelliSense.
-  Expose an explicit implementation of IAccessor<ServiceProvider>to support extension methods.
- Remove this constructor as it's not clear that mocking this class is really a valid scenario.
Remove these properties which are exposed to support extension methods
- DataStoreCreator
- Logger
- Model
- Remove IDatabaseInternals and replace with the following explicit interface implementations:
-  IAccessor<DataStoreCreator>
-  IAccessor<ILogger>
-  IAccessor<IModel>
-  IAccessor<ServiceProvider>