コード例 #1
0
ファイル: EntityRepository.cs プロジェクト: radun2/Project
        public virtual void InsertOrUpdateGraph(TEntity entityGraph)
        {
            context.Set <TEntity>().Add(entityGraph);

            if (entityGraph.State != ModelState.Added)
            {
                context.ApplyStateChanges();
            }
        }