private T?GetEntityTypeSourceSystemParameterValue <T>( FeedAsset feed, Func <FeedAttribute, T> getParameter) where T : struct { return (feed .Attributes .Where(a => Convert.ToInt32(getParameter(a)) != 0) .Select(a => (T?)getParameter(a)) .FirstOrDefault()); }
private void SetEntityTypeSourceSystemParameters( IDeploymentContext context, FeedAsset feed) { OrphanMappingBehavior?orphanMappingBehavior = this.GetEntityTypeSourceSystemParameterValue( feed, fa => fa.OrphanMappingBehavior); if (orphanMappingBehavior.HasValue) { context.OrphanMappingBehavior( feed.EntityType.Id, feed.SourceSystem.Id, orphanMappingBehavior.Value); } }