예제 #1
0
        public virtual void InsertOrUpdateGraph(TEntity entityGraph)
        {
            context.Set <TEntity>().Add(entityGraph);

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