Ejemplo n.º 1
0
        public void Delete(T entity)
        {
            InspectionProcessEntities context = CreateContext();

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

            context.SaveChanges();
        }
Ejemplo n.º 2
0
        public virtual void Insert(T entity)
        {
            InspectionProcessEntities context = CreateContext();

            //context.Albums.Add(album);
            context.Entry(entity).State = EntityState.Added;

            context.SaveChanges();
        }