Esempio n. 1
0
        public async Task <Project> AddProject(ProjectForManipulation project)
        {
            Project newProject = new Project {
                Name = project.Name, Description = project.Description
            };

            db.Projects.Add(newProject);
            await db.SaveChangesAsync();

            return(newProject);
        }
Esempio n. 2
0
 public async Task UpdateProject(ProjectForManipulation project, Project oldProject)
 {
     oldProject.Name        = project.Name;
     oldProject.Description = project.Description;
     await db.SaveChangesAsync();
 }