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