Пример #1
0
        public void Update(T entity)
        {
            MBTIEntities context = CreateContext();

            context.Entry(entity).State = EntityState.Modified;
            context.SaveChanges();
        }
Пример #2
0
        public void Delete(T entity)
        {
            MBTIEntities context = CreateContext();

            context.Entry(entity).State = EntityState.Deleted;
            context.SaveChanges();
        }
Пример #3
0
        public void Insert(T entity)
        {
            MBTIEntities context = CreateContext();

            context.Entry(entity).State = EntityState.Added;

            context.SaveChanges();
        }