示例#1
0
 internal static void SaveGenericFile(GenericFile file)
 {
     using (CoreModel coreDAL = new CoreModel())
     {
         coreDAL.GenericFile.Add(file);
         coreDAL.SaveChanges();
     }
 }
示例#2
0
 internal static void UpdateGenericFile(GenericFile file)
 {
     using (CoreModel coreDAL = new CoreModel())
     {
         coreDAL.Entry(file).State = System.Data.Entity.EntityState.Modified;
         coreDAL.SaveChanges();
     }
 }