Exemplo n.º 1
0
        public bool Delete(EventLog eventLog)
        {
            if (eventLog == null) return false;

            using (var db = new DozpContext())
            {
                db.Entry(eventLog).State = EntityState.Deleted;
                db.SaveChanges();
            }

            return true;
        }
Exemplo n.º 2
0
        public EventLog Create(EventLog eventLog)
        {
            if (eventLog == null) return null;

            using (var db = new DozpContext())
            {
                db.Entry(eventLog).State = EntityState.Added;
                db.SaveChanges();
            }

            return eventLog;
        }