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