public CommunicationModelBuilder EntityProjection(Type interfaceType)
        {
            if (!interfaceType.IsInterface)
            {
                throw new ArgumentException($"The type '{interfaceType}' must be an interface to qualify for an entity projection.");
            }
            if (Model.FindEntityProjectionByIterfaceType(interfaceType) != null)
            {
                return(this);
            }
            var definition = new EntityProjectionDefinition((CommunicationModel)Model, interfaceType);
            var builder    = new EntityProjectionDefinitionBuilder(definition);

            return(this);
        }
Exemplo n.º 2
0
 internal void OnEntityProjectionInterfaceSet(EntityProjectionDefinition definition)
 {
     _entityProjections.Add(definition);
     _entityProjectionsByInterfaceType.Add(definition.InterfaceType, definition);
 }