示例#1
0
        public static DA.Project ToEntity(this DT.Project source)
        {
            if (source == null)
            {
                return(null);
            }
            var result = new DA.Project();

            source.CopyToEntity(result);
            return(result);
        }
示例#2
0
 public static void CopyToEntity(this DT.Project source, DA.Project target)
 {
     if ((source == null) || (target == null))
     {
         return;
     }
     target.ProjectId       = source.Id;
     target.ParentProjectId = source.ParentProjectId;
     target.DateCreated     = source.DateCreated;
     target.Name            = source.Name;
     target.Description     = source.Description;
     target.OwnerUserId     = source.OwnerUserId;
     target.StartDate       = source.StartDate;
     target.EndDate         = source.EndDate;
 }
示例#3
0
 public static DT.Project ToDto(this DA.Project source)
 {
     if (source == null)
     {
         return(null);
     }
     return(new DT.Project {
         Id = source.ProjectId,
         ParentProjectId = source.ParentProjectId,
         DateCreated = source.DateCreated,
         Name = source.Name,
         Description = source.Description,
         OwnerUserId = source.OwnerUserId,
         StartDate = source.StartDate,
         EndDate = source.EndDate
     });
 }