public int Update(ProjectCompetitor pp) { var bd = db.ProjectCompetitors.Where(a => a.ID == pp.ID).SingleOrDefault(); bd.CompetiorID = pp.CompetiorID; bd.ProjectID = bd.ProjectID; return(db.SaveChanges()); }
public long Insert(ProjectCompetitor buider) { db.ProjectCompetitors.Add(buider); db.SaveChanges(); return(buider.ID); }