Exemple #1
0
 public virtual TEntity Insert(TEntity entity)
 {
     entity.SyncObjectState(ObjectState.Added);
     DbSet.Attach(entity);
     Context.SyncObjectState(entity);
     return(entity);
 }
Exemple #2
0
 public virtual TEntity Insert(TEntity entity, TKey identifier = default)
 {
     entity.SyncObjectState(ObjectState.Added);
     DbSet.Attach(entity);
     Context.SyncObjectState(entity);
     return(entity);
 }
Exemple #3
0
 public virtual void Insert(TEntity entity)
 {
     entity.SyncObjectState(ObjectState.Added);
     _dbSet.Attach(entity);
     _context.SyncObjectState(entity);
 }