コード例 #1
0
        public void Delete(T entity)
        {
            InspectionProcessEntities context = CreateContext();

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

            context.SaveChanges();
        }
コード例 #2
0
        public virtual void Insert(T entity)
        {
            InspectionProcessEntities context = CreateContext();

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

            context.SaveChanges();
        }