Пример #1
0
 public void Update(Project4 item)
 {
     using (masterContext db = new masterContext())
     {
         db.Project4.Update(item);
         db.SaveChanges();
     }
 }
Пример #2
0
 public void Delete(int pid)
 {
     using (masterContext db = new masterContext())
     {
         Project4 p = db.Project4.Find(pid);
         db.Project4.Remove(p);
         db.SaveChanges();
     }
 }
Пример #3
0
 static void Main(string[] args)
 {
     using (MyContext db = new MyContext())
     {
         Project4 p = new Project4()
         {
             ProjectName = "BFS"
         };
         db.Add(p);
         db.SaveChanges();
     }
 }