public static BL.ProjectStatusInfo MapMvcToBusiness(MVC.ProjectStatusInfo source)
 {
     if (source == null)
     {
         return(null);
     }
     BL.ProjectStatusInfo target = BL.ProjectStatusInfo.GetOrCreate(MapSupport.ActiveCtx, source.ProjectStatusInfoId);
     if (target.Version != Guid.Empty && target.Version != source.ProjectStatusInfoVersion)
     {
         throw new DataException("Concurrency check failed");
     }
     if (source.ProjectStatusInfoIsDeleted)
     {
         target.Delete(MapSupport.ActiveCtx);
         return(null);
     }
     else
     {
         target.Version                 = source.ProjectStatusInfoVersion;
         target.Owner                   = source.ProjectStatusInfoOwner;
         target.Updated                 = source.ProjectStatusInfoUpdated;
         target.Goal                    = source.ProjectStatusInfoGoal;
         target.Measurements            = MapProjectMeasurement.MapMvcToBusinessList(source.Measurements);
         target.Actions                 = MapProjectAction.MapMvcToBusinessList(source.Actions);
         target.InterestGroups          = MapInterestGroup.MapMvcToBusinessList(source.InterestGroups);
         target.Results                 = MapProjectResult.MapMvcToBusinessList(source.Results);
         target.ChallengesAndExceptions = MapProjectChallenge.MapMvcToBusinessList(source.ChallengesAndExceptions);
         target.CounterActions          = MapCounterAction.MapMvcToBusinessList(source.CounterActions);
     }
     return(target);
 }
        public static MVC.ProjectStatusInfo MapBusinessToMvc(BL.ProjectStatusInfo source)
        {
            if (source == null)
            {
                return(null);
            }
            MVC.ProjectStatusInfo target = new MVC.ProjectStatusInfo();
            target.ProjectStatusInfoId      = source.Id;
            target.ProjectStatusInfoVersion = source.Version;
            target.ProjectStatusInfoOwner   = source.Owner;
            target.ProjectStatusInfoUpdated = source.Updated;
            target.ProjectStatusInfoGoal    = source.Goal;
            target.Measurements             = MapProjectMeasurement.MapBusinessToMvcList(source.Measurements);
            target.Actions                 = MapProjectAction.MapBusinessToMvcList(source.Actions);
            target.InterestGroups          = MapInterestGroup.MapBusinessToMvcList(source.InterestGroups);
            target.Results                 = MapProjectResult.MapBusinessToMvcList(source.Results);
            target.ChallengesAndExceptions = MapProjectChallenge.MapBusinessToMvcList(source.ChallengesAndExceptions);
            target.CounterActions          = MapCounterAction.MapBusinessToMvcList(source.CounterActions);


            return(target);
        }