Пример #1
0
        public Boolean Update(CaseType record)
        {
            if (record == null)
            {
                return(false);
            }
            var attached = CaseTypes.Attach(record);

            if (attached == null)
            {
                return(false);
            }
            Entry(attached).State = EntityState.Modified;
            return(SaveChanges() == 1);
        }
Пример #2
0
        public Boolean Remove(CaseType record)
        {
            if (record == null)
            {
                return(false);
            }
            var attached = CaseTypes.Attach(record);

            if (attached == null)
            {
                return(false);
            }
            CaseTypes.Remove(attached);
            return(SaveChanges() == 1);
        }