示例#1
0
 public EntityEntry <TEntity> Add(TEntity entity)
 {
     return(_context.Set <TEntity>()
            .Add(entity));
 }
示例#2
0
 /// <summary>
 /// Constructor for IRepository Pattern implementation
 /// </summary>
 /// <param name="context">instance of DbContext</param>
 public Repository(TestDataBaseContext context)
 {
     _context     = context;
     testDBEntity = _context.Set <TEntity>();
 }