Skip to content

Commit dea8f57

Browse files
committed
C#: Update the EntityFramework stubs to align with the real implementation.
1 parent 97a0e44 commit dea8f57

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

csharp/ql/test/resources/stubs/EntityFramework.cs

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,12 @@ public class DbSet
1010
{
1111
}
1212

13-
public class DbSet<T> : IEnumerable<T>
13+
public class DbSet<TEntity> : IEnumerable<TEntity>
1414
{
15-
public void Add(T t) { }
16-
public System.Threading.Tasks.Task<int> AddAsync(T t) => null;
17-
public void AddRange(IEnumerable<T> t) { }
18-
public System.Threading.Tasks.Task<int> AddRangeAsync(IEnumerable<T> t) => null;
19-
public void Attach(T t) { }
20-
public void AttachRange(IEnumerable<T> t) { }
21-
public void Update(T t) { }
22-
public void UpdateRange(IEnumerable<T> t) { }
23-
IEnumerator<T> IEnumerable<T>.GetEnumerator() => null;
15+
public void Add(TEntity t) { }
16+
public void AddRange(IEnumerable<TEntity> t) { }
17+
public void Attach(TEntity t) { }
18+
IEnumerator<TEntity> IEnumerable<TEntity>.GetEnumerator() => null;
2419
IEnumerator IEnumerable.GetEnumerator() => null;
2520
}
2621

@@ -59,17 +54,22 @@ public class DbRawSqlQuery<T> : IEnumerable<T>, IListSource, IDbAsyncEnumerable
5954

6055
namespace Microsoft.EntityFrameworkCore
6156
{
62-
public class DbSet<T> : IEnumerable<T>
57+
public class DbSet<TEntity> : IEnumerable<TEntity>
6358
{
64-
public void Add(T t) { }
65-
public System.Threading.Tasks.Task<int> AddAsync(T t) => null;
66-
public void AddRange(IEnumerable<T> t) { }
67-
public System.Threading.Tasks.Task<int> AddRangeAsync(IEnumerable<T> t) => null;
68-
public void Attach(T t) { }
69-
public void AttachRange(IEnumerable<T> t) { }
70-
public void Update(T t) { }
71-
public void UpdateRange(IEnumerable<T> t) { }
72-
IEnumerator<T> IEnumerable<T>.GetEnumerator() => null;
59+
public void Add(TEntity t) { }
60+
public System.Threading.Tasks.Task<int> AddAsync(TEntity t, System.Threading.CancellationToken ct = default) => null;
61+
public void AddRange(IEnumerable<TEntity> t) { }
62+
public void AddRange(TEntity[] t) { }
63+
public System.Threading.Tasks.Task<int> AddRangeAsync(IEnumerable<TEntity> t, System.Threading.CancellationToken ct = default) => null;
64+
public System.Threading.Tasks.Task<int> AddRangeAsync(TEntity[] t) => null;
65+
public void Attach(TEntity t) { }
66+
public void AttachRange(IEnumerable<TEntity> t) { }
67+
public void AttachRange(TEntity[] t) { }
68+
public void Update(TEntity t) { }
69+
public void UpdateRange(IEnumerable<TEntity> t) { }
70+
public void UpdateRange(TEntity[] t) { }
71+
72+
IEnumerator<TEntity> IEnumerable<TEntity>.GetEnumerator() => null;
7373
IEnumerator IEnumerable.GetEnumerator() => null;
7474
}
7575

0 commit comments

Comments
 (0)