Esempio n. 1
0
        public int UpdateLog(Log log)
        {
            using (var db = new AIMS_DB_IATIEntities())
            {
                var ll = db.Logs.Where(f => f.LogType == log.LogType && f.IatiIdentifier == log.IatiIdentifier);

                foreach (var item in ll)
                {
                    item.IsActive = log.IsActive;
                }

                return db.SaveChanges();
            }
        }
Esempio n. 2
0
 public int InsertLog(Log log)
 {
     using (var db = new AIMS_DB_IATIEntities())
     {
         dbContext.Logs.Add(log);
         return db.SaveChanges();
     }
 }