示例#1
0
        public Boolean Update(RecentCase record)
        {
            if (record == null)
            {
                return(false);
            }
            var attached = RecentCases.Attach(record);

            if (attached == null)
            {
                return(false);
            }
            Entry(attached).State = EntityState.Modified;
            return(SaveChanges() == 1);
        }
示例#2
0
        public Boolean Remove(RecentCase record)
        {
            if (record == null)
            {
                return(false);
            }
            var attached = RecentCases.Attach(record);

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