Design Meeting Notes - August 9, 2012

Getting schema Information from providers

Providers are currently required to do some complex things in order to provide schema information about a database. The goal of this work is to simplify the way provider writers implement this functionality while minimizing the disruption to existing providers.

A one-pager with details will be pushed to the Feature Specifications page soon.

Discussion points/open questions:

  • Should the column class contain an ordinal field or is the order of the enumeration sufficient?
  • We should use the s-space EDM object model from Code First
    • This will need some cleanup before it can be made public, but this needs to be done for public conventions anyway
  • Can we provide a Code First model (i.e. a context and sets) to which providers can provide their own mapping?
    • Easy for some providers; hard for others where there really are not reasonable mappings
    • We can provide a non-context based interface (like a Repository) and then also provide a Code First model to back it. Use of the Code First model will make it very easy for some providers, but the Repository can also be implemented without it where mapping is not reasonable.

Using IDbDependencyResolver with existing IoC containers

An investigation was made into using Ninject as part of code-based configuration and for resolving EF dependencies. The main problems found were:

  • DbConfiguration must be creatable by tooling at design-time and it must have an Ninject “kernel” instance to resolve dependencies.
    • The kernel can be created inside DbConfiguration; this is fine.
    • If the kernel is also needed other places then it will have to be obtained in some way; this is not especially pretty but consensus is that it’s probably okay.
    • Need to investigate with other IoC containers.
  • Ninject throws if a dependency cannot be resolved.
    • This is pretty standard but doesn’t match the pattern we need which is to return null if the dependency can’t be resolved so that other resolvers in the chain have a chance to do the resolution.
    • Need to investigate further how to handle this—e.g. catch exception—in both Ninject and other containers.

Last edited Dec 14, 2012 at 5:19 PM by ajcvickers, version 2


No comments yet.