コード例 #1
0
ファイル: EntityData.cs プロジェクト: paulown1a/SILS
        public void Update(List <T> entities)
        {
            SILSEntities context = CreateContext();

            context.Entry(entities).State = EntityState.Modified;
            context.SaveChanges();
        }
コード例 #2
0
ファイル: EntityData.cs プロジェクト: paulown1a/SILS
        public void Delete(T entity)
        {
            SILSEntities context = CreateContext();

            context.Entry(entity).State = EntityState.Deleted;
            context.SaveChanges();
        }
コード例 #3
0
ファイル: EntityData.cs プロジェクト: paulown1a/SILS
        public void Insert(T entity)
        {
            SILSEntities context = CreateContext();

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