Example #1
0
        public PPTag UpdateTags(PPTag updatedPPTag)
        {
            var entity = _context.PersonalProjectTags.Attach(updatedPPTag);

            entity.State = EntityState.Modified;
            return(updatedPPTag);
        }
Example #2
0
 public IActionResult OnGet(int?projectId)
 {
     ProjectTags = _htmlHelper.GetEnumSelectList <ProjectTag>();
     if (projectId.HasValue)
     {
         Heading         = "Edit";
         PersonalProject = _projectData.GetPersonalProjectById(projectId.Value);
         PPTag           = _projectData.GetPPTagsByPersonalProjectId(projectId.Value);
     }
     else
     {
         Heading         = "Add";
         PersonalProject = new PersonalProject();
         PPTag           = new PPTag();
     }
     if (PersonalProject == null)
     {
         return(RedirectToPage("/Shared/_NotFound"));
     }
     return(Page());
 }
Example #3
0
 public PPTag AddTags(PPTag newPPTag)
 {
     _context.PersonalProjectTags.Add(newPPTag);
     return(newPPTag);
 }