public void InjectSingle(QueryResult queryResult, TView instance) { var reader = new QueryResultModelReader <TEntity>(_model, queryResult); var writer = new ObjectDataModelWriter <TView>(instance, _objectFactory); _mapping.Run(reader, writer); }
public void InjectSingle(QueryResult queryResult, TView instance) { var entity = _objectFactory.CreateInstance <TEntity>(); var entityReader = new QueryResultModelReader <TEntity>(_storageModel, queryResult); var entityWriter = new ObjectDataModelWriter <TEntity>(entity, _objectFactory); _toEntityMapping.Run(entityReader, entityWriter); var viewReader = new ObjectDataModelReader <TEntity>(entity); var viewWriter = new ObjectDataModelWriter <TView>(instance, _objectFactory); _toViewMapping.Run(viewReader, viewWriter); }