public bool AssignSection(ProjectSectionModel model) { var projectSection = _sectionProjectRepository.GetSectionProjectByIds(model.SectionId, model.ProjectId); if (projectSection != null) { throw new ProjectAlreadyInSectionException("El proyecto ya esta registrado en esa seccion."); } _projectRepository.AssignToSection(model.ProjectId, model.SectionId); _projectRepository.Save(); return(true); }
public IHttpActionResult PostRemoveSection(ProjectSectionModel model) { _services.RemoveFromSection(model.ProjectId, model.SectionId); return(Ok()); }
public IHttpActionResult PostAssignSection(ProjectSectionModel model) { _services.AssignSection(model); return(Ok()); }