public Evalulation AddEvalulation(Evalulation Evalulation) { using (KonkursProektovEntities db = new KonkursProektovEntities()) { db.Evalulation.Add(Evalulation); db.SaveChanges(); } return(Evalulation); }
public void DeleteEvaluation(int id_Request, int id_Expert) { using (KonkursProektovEntities db = new KonkursProektovEntities()) { Evalulation ev = db.Evalulation .Where(o => o.Expert_ID == id_Expert && o.Request_ID == id_Request) .FirstOrDefault(); db.Evalulation.Remove(ev); db.SaveChanges(); } }
public void UpdateEvaluation(Evalulation evaluation) { using (KonkursProektovEntities db = new KonkursProektovEntities()) { Evalulation ev = db.Evalulation .Where(o => o.Expert_ID == evaluation.Expert_ID && o.Request_ID == evaluation.Request_ID) .FirstOrDefault(); ev.Name = evaluation.Name; ev.EvalulationNum = evaluation.EvalulationNum; db.SaveChanges(); } }