-
Notifications
You must be signed in to change notification settings - Fork 1
Configuration Exceptions
To use QueryMappings you need to register all Storage classes with descriptions of mappings in it. During registration process you can catch a few different types of exceptions:
-
Couldn't find empty constructor for IMappingStorage implementation
If you see this error message, then one or more of your IMappingsStorage implementations probably have non-default constructor. All Mappings Storage implementations should have default or explicit empty constructor to work.
-
Context Resolver wasn't registered for type {0}. To use Query Mappings you need to register context resolver function.
You probably registered mapping with injected EntityFramework context, but forgot to register ContextResolverFunction. If you are going to use mappings with injected EF Context, you need to register ContextResolverFunction. You can use any IoC container that you prefer, but QueryMappings should know how to inject context into your mapping. To make it possible, you have to provide function that takes one argument (context key) and returns resolved EF Context instance (or its interface). If you have few different EF Contexts in your project, they all can inherit one common interface, and you can resolve specific context with help of context key.
-
Exception has happened inside of Setup method invocation on IMappingStorage of type {0}
In this case some error has happened inside of implementation of Setup method. Please debug your Setup method in specified IMappingStorage to find the problem.
-
General exception has happened on attempt to create IMappingStorage instance of type {0}
General message that shows that something went wrong on attempt to create instance of IMappingStorage. This happens before Setup method is called. Please see Inner Exception for more details.
-
Exception has happened during mappings initialization. Please see Inner Exception to find more details.
This is a common message that only shows that something went wrong during mapping initialization. This problem may not be connected with QueryMappings library itself. Please check Inner Exception for more details.
You can find more info here.