public IResultMapper <TView> Select <TView>( ProjectionModel <TEntity, TView> projectionModel ) where TView : class { var(fields, joins) = projectionModel.GetProjectedFields(_tableIdentifier); _joinBuilders.AddRange(joins); foreach (var kvp in fields) { if (_projectionExpressions.ContainsKey(kvp.Key)) { continue; } _projectionExpressions.Add(kvp.Key, kvp.Value); } return(new EntityTypeMapper <TEntity, TView>( _dataModel.StorageModel, projectionModel.StorageToEntityMapping, projectionModel.EntityToViewMapping, _objectFactory )); }
public Mapping.IResultMapper <TView> Select <TView>(ProjectionModel <TEntity, TView> projectionModel) where TView : class => _projectionBuilder.Select(projectionModel);