예제 #1
0
        public Boolean Update(Basic record)
        {
            if (record == null)
            {
                return(false);
            }
            var attached = Basics.Attach(record);

            if (attached == null)
            {
                return(false);
            }
            Entry(attached).State = EntityState.Modified;
            return(SaveChanges() == 1);
        }
예제 #2
0
        public Boolean Remove(Basic record)
        {
            if (record == null)
            {
                return(false);
            }
            var attached = Basics.Attach(record);

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