public static MVC.ProjectChallenge MapBusinessToMvc(BL.ProjectChallenge source)
        {
            if (source == null)
            {
                return(null);
            }
            MVC.ProjectChallenge target = new MVC.ProjectChallenge();
            target.ProjectChallengeId      = source.Id;
            target.ProjectChallengeVersion = source.Version;
            target.ProjectChallengeText    = source.Text;


            return(target);
        }
 public static BL.ProjectChallenge MapMvcToBusiness(MVC.ProjectChallenge source)
 {
     if (source == null)
     {
         return(null);
     }
     BL.ProjectChallenge target = BL.ProjectChallenge.GetOrCreate(MapSupport.ActiveCtx, source.ProjectChallengeId);
     if (target.Version != Guid.Empty && target.Version != source.ProjectChallengeVersion)
     {
         throw new DataException("Concurrency check failed");
     }
     if (source.ProjectChallengeIsDeleted)
     {
         target.Delete(MapSupport.ActiveCtx);
         return(null);
     }
     else
     {
         target.Version = source.ProjectChallengeVersion;
         target.Text    = source.ProjectChallengeText;
     }
     return(target);
 }
        public static MVC.ProjectChallenge MapBusinessToMvc(BL.ProjectChallenge source)
        {
            if(source == null)
                    return null;
                MVC.ProjectChallenge target = new MVC.ProjectChallenge();
                    target.ProjectChallengeId = source.Id;
                target.ProjectChallengeVersion = source.Version;
                target.ProjectChallengeText = source.Text;

                return target;
        }