public Project Add(Project project) { project.Department = _context.Contributors.Find(_contributorId).Department; project = _context.Projects.Add(project); _context.SaveChanges(); return project; }
public Project Update(Project project) { Project projectToUpdate = _context.Projects.Find(project.Id); projectToUpdate.Title = project.Title; projectToUpdate.Description = project.Description; _context.SaveChanges(); return project; }