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

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