コード例 #1
0
        /// <summary>
        /// construct new project out of form data
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        public Project ConstructProject(ProjectForm form)
        {
            var p = new Project
            {
                ProjectId = form.ProjectId,
                ProjectName = form.ProjectName
            };

            return p;
        }
コード例 #2
0
 /// <summary>
 /// Updates roject with data from the web form 
 /// </summary>
 /// <param name="projectToUpdate">project entity from database</param>
 /// <param name="projectForm">data entered on web form</param>
 public void UpdateProject(Project projectToUpdate, ProjectForm projectForm)
 {
     projectToUpdate.ProjectName = projectForm.ProjectName;
 }