Пример #1
0
 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());
 }
Пример #2
0
        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);
            }
        }