@@ -16,6 +16,13 @@ public interface IDbContextBuilder
16
16
/// <returns>The same <see cref="DbContext"/> builder.</returns>
17
17
IAndDbContextBuilder WithEntities ( IEnumerable < object > entities ) ;
18
18
19
+ /// <summary>
20
+ /// Remove values from the registered <see cref="DbContext"/>.
21
+ /// </summary>
22
+ /// <param name="entities">Values to remove from the registered <see cref="DbContext"/>.</param>
23
+ /// <returns>The same <see cref="DbContext"/> builder.</returns>
24
+ IAndDbContextBuilder WithoutEntities ( IEnumerable < object > entities ) ;
25
+
19
26
/// <summary>
20
27
/// Sets initial values to the provided <see cref="DbContext"/>.
21
28
/// </summary>
@@ -24,14 +31,30 @@ public interface IDbContextBuilder
24
31
/// <returns>The same <see cref="DbContext"/> builder.</returns>
25
32
IAndDbContextBuilder WithEntities < TDbContext > ( IEnumerable < object > entities )
26
33
where TDbContext : DbContext ;
27
-
34
+
35
+ /// <summary>
36
+ /// Remove values from the registered <see cref="DbContext"/>.
37
+ /// </summary>
38
+ /// <typeparam name="TDbContext">Type of <see cref="DbContext"/> to set up.</typeparam>
39
+ /// <param name="entities">Values to remove from the registered <see cref="DbContext"/>.</param>
40
+ /// <returns>The same <see cref="DbContext"/> builder.</returns>
41
+ IAndDbContextBuilder WithoutEntities < TDbContext > ( IEnumerable < object > entities )
42
+ where TDbContext : DbContext ;
43
+
28
44
/// <summary>
29
45
/// Sets initial values to the registered <see cref="DbContext"/>.
30
46
/// </summary>
31
47
/// <param name="entities">Initial values to add to the registered <see cref="DbContext"/>.</param>
32
48
/// <returns>The same <see cref="DbContext"/> builder.</returns>
33
49
IAndDbContextBuilder WithEntities ( params object [ ] entities ) ;
34
50
51
+ /// <summary>
52
+ /// Remove values from the registered <see cref="DbContext"/>.
53
+ /// </summary>
54
+ /// <param name="entities">Values to remove from the registered <see cref="DbContext"/>.</param>
55
+ /// <returns>The same <see cref="DbContext"/> builder.</returns>
56
+ IAndDbContextBuilder WithoutEntities ( params object [ ] entities ) ;
57
+
35
58
/// <summary>
36
59
/// Sets initial values to the provided <see cref="DbContext"/>.
37
60
/// </summary>
@@ -41,13 +64,29 @@ IAndDbContextBuilder WithEntities<TDbContext>(IEnumerable<object> entities)
41
64
IAndDbContextBuilder WithEntities < TDbContext > ( params object [ ] entities )
42
65
where TDbContext : DbContext ;
43
66
67
+ /// <summary>
68
+ /// Remove values from the provided <see cref="DbContext"/>.
69
+ /// </summary>
70
+ /// <typeparam name="TDbContext">Type of <see cref="DbContext"/> to set up.</typeparam>
71
+ /// <param name="entities">Values to remove from the provided <see cref="DbContext"/>.</param>
72
+ /// <returns>The same <see cref="DbContext"/> builder.</returns>
73
+ IAndDbContextBuilder WithoutEntities < TDbContext > ( params object [ ] entities )
74
+ where TDbContext : DbContext ;
75
+
44
76
/// <summary>
45
77
/// Sets initial values to the registered <see cref="DbContext"/>.
46
78
/// </summary>
47
79
/// <param name="dbContextSetup">Action setting the <see cref="DbContext"/>.</param>
48
80
/// <returns>The same <see cref="DbContext"/> builder.</returns>
49
81
IAndDbContextBuilder WithEntities ( Action < DbContext > dbContextSetup ) ;
50
82
83
+ /// <summary>
84
+ /// Remove values from the registered <see cref="DbContext"/>.
85
+ /// </summary>
86
+ /// <param name="dbContextSetup">Action setting the <see cref="DbContext"/>.</param>
87
+ /// <returns>The same <see cref="DbContext"/> builder.</returns>
88
+ IAndDbContextBuilder WithoutEntities ( Action < DbContext > dbContextSetup ) ;
89
+
51
90
/// <summary>
52
91
/// Sets initial values to the provided <see cref="DbContext"/>.
53
92
/// </summary>
@@ -57,6 +96,21 @@ IAndDbContextBuilder WithEntities<TDbContext>(params object[] entities)
57
96
IAndDbContextBuilder WithEntities < TDbContext > ( Action < TDbContext > dbContextSetup )
58
97
where TDbContext : DbContext ;
59
98
99
+ /// <summary>
100
+ /// Remove values from the provided <see cref="DbContext"/>.
101
+ /// </summary>
102
+ /// <typeparam name="TDbContext">Type of <see cref="DbContext"/> to set up.</typeparam>
103
+ /// <param name="dbContextSetup">Action setting the <see cref="DbContext"/>.</param>
104
+ /// <returns>The same <see cref="DbContext"/> builder.</returns>
105
+ IAndDbContextBuilder WithoutEntities < TDbContext > ( Action < TDbContext > dbContextSetup )
106
+ where TDbContext : DbContext ;
107
+
108
+ /// <summary>
109
+ /// Wipe the whole database data, returning it to a clean state.
110
+ /// </summary>
111
+ /// <returns>The same <see cref="DbContext"/> builder.</returns>
112
+ IAndDbContextBuilder WipeDatabase ( ) ;
113
+
60
114
/// <summary>
61
115
/// Sets initial values to the provided <see cref="DbContext"/> entity.
62
116
/// </summary>
@@ -66,6 +120,15 @@ IAndDbContextBuilder WithEntities<TDbContext>(Action<TDbContext> dbContextSetup)
66
120
IAndDbContextBuilder WithSet < TEntity > ( Action < DbSet < TEntity > > entitySetup )
67
121
where TEntity : class ;
68
122
123
+ /// <summary>
124
+ /// Remove values from the provided <see cref="DbContext"/> entity.
125
+ /// </summary>
126
+ /// <typeparam name="TEntity">Type of entity to remove.</typeparam>
127
+ /// <param name="entitySetup">Action setting the <see cref="DbContext"/> entity.</param>
128
+ /// <returns>The same <see cref="DbContext"/> builder.</returns>
129
+ IAndDbContextBuilder WithoutSet < TEntity > ( Action < DbSet < TEntity > > entitySetup )
130
+ where TEntity : class ;
131
+
69
132
/// <summary>
70
133
/// Sets initial values to the provided <see cref="DbContext"/> entity.
71
134
/// </summary>
@@ -76,5 +139,16 @@ IAndDbContextBuilder WithSet<TEntity>(Action<DbSet<TEntity>> entitySetup)
76
139
IAndDbContextBuilder WithSet < TDbContext , TEntity > ( Action < DbSet < TEntity > > entitySetup )
77
140
where TDbContext : DbContext
78
141
where TEntity : class ;
142
+
143
+ /// <summary>
144
+ /// Remove values from the provided <see cref="DbContext"/> entity.
145
+ /// </summary>
146
+ /// <typeparam name="TDbContext">Type of <see cref="DbContext"/> to remove values from.</typeparam>
147
+ /// <typeparam name="TEntity">Type of entity to remove.</typeparam>
148
+ /// <param name="entitySetup">Action setting the <see cref="DbContext"/> entity.</param>
149
+ /// <returns>The same <see cref="DbContext"/> builder.</returns>
150
+ IAndDbContextBuilder WithoutSet < TDbContext , TEntity > ( Action < DbSet < TEntity > > entitySetup )
151
+ where TDbContext : DbContext
152
+ where TEntity : class ;
79
153
}
80
154
}
0 commit comments