예제 #1
0
 public TPrimaryKey InsertAndGetId(TEntity entity)
 {
     entity = Insert(entity);
     if (entity.IsTransient())
     {
         _context.SaveChanges();
     }
     return(entity.Id);
 }
예제 #2
0
 public bool Commit()
 {
     return(_context.SaveChanges() > 0);
 }