private void RegisterSpecification(Type specificationType, IUnityContainer container)
{
var resulType =
specificationType.GetInterfaces()
.Single(
t => t.IsGenericType && t.GetGenericTypeDefinition() == typeof(ISpecification<>))
.GetGenericArguments()
.Single();
var queryDataType = specificationType;
var interfaceType = typeof(IQueryRepositoryCommand<,>).MakeGenericType(queryDataType, resulType);
var commandType = typeof(SpecificationCommand<>).MakeGenericType(resulType);
container.RegisterType(interfaceType, commandType);
}