Пример #1
0
 public Mat ModifyMat(Mat newMat)
 {
     using (var db = new DatabaseContext())
     {
         db.Entry(newMat).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
         return (Mat)db.Mats.Find(newMat.MatId);
     }
 }
Пример #2
0
 public Mat CreateMat(Mat mat)
 {
     using (var db = new DatabaseContext())
     {
         Mat addedMat = (Mat)db.Mats.Add((EntityFramework.Mat)mat);
         db.SaveChanges();
         return addedMat;
     }
 }
Пример #3
0
 public Mat ModifyMat(Mat newMat)
 {
     return MatAccessor.ModifyMat(newMat);
 }
Пример #4
0
 public Mat CreateMat(Mat mat)
 {
     return MatAccessor.CreateMat(mat);
 }