public void Edit(ProjectManagerDbContext db) { var project = Mapper.Map<ProjectViewModel, Project>(this); db.Entry(project).State = EntityState.Modified; db.SaveChanges(); }
public void Create(ProjectManagerDbContext db) { var project = Mapper.Map<ProjectViewModel, Project>(this); db.Projects.Add(project); db.SaveChanges(); }