예제 #1
0
        public ProjectAttributes Update(ProjectAttributes projectChanges)
        {
            var project = context.Projects.Attach(projectChanges);

            project.State = Microsoft.EntityFrameworkCore.EntityState.Modified;
            context.SaveChanges();
            return(projectChanges);
        }
예제 #2
0
 public ProjectAttributes Add(ProjectAttributes project)
 {
     context.Projects.Add(project);
     context.SaveChanges();
     return(project);
 }