@@ -8,56 +8,56 @@ namespace Nullinside.Api.Model;
8
8
/// <summary>
9
9
/// Represents the nullinside database.
10
10
/// </summary>
11
- public interface INullinsideContext {
11
+ public interface INullinsideContext : IAsyncDisposable {
12
12
/// <summary>
13
13
/// The users table which contains all of the users that have ever authenticated with the site.
14
14
/// </summary>
15
- public DbSet < User > Users { get ; set ; }
15
+ DbSet < User > Users { get ; set ; }
16
16
17
17
/// <summary>
18
18
/// The user's roles table which contains all of the "roles" the user has in the application.
19
19
/// </summary>
20
- public DbSet < UserRole > UserRoles { get ; set ; }
20
+ DbSet < UserRole > UserRoles { get ; set ; }
21
21
22
22
/// <summary>
23
23
/// The docker deployments that are configurable in the applications.
24
24
/// </summary>
25
- public DbSet < DockerDeployments > DockerDeployments { get ; set ; }
25
+ DbSet < DockerDeployments > DockerDeployments { get ; set ; }
26
26
27
27
/// <summary>
28
28
/// The docker deployments that are configurable in the applications.
29
29
/// </summary>
30
- public DbSet < TwitchUser > TwitchUser { get ; set ; }
30
+ DbSet < TwitchUser > TwitchUser { get ; set ; }
31
31
32
32
/// <summary>
33
33
/// The docker deployments that are configurable in the applications.
34
34
/// </summary>
35
- public DbSet < TwitchBan > TwitchBan { get ; set ; }
35
+ DbSet < TwitchBan > TwitchBan { get ; set ; }
36
36
37
37
/// <summary>
38
38
/// The feature toggles.
39
39
/// </summary>
40
- public DbSet < FeatureToggle > FeatureToggle { get ; set ; }
40
+ DbSet < FeatureToggle > FeatureToggle { get ; set ; }
41
41
42
42
/// <summary>
43
43
/// The twitch user configuration.
44
44
/// </summary>
45
- public DbSet < TwitchUserConfig > TwitchUserConfig { get ; set ; }
45
+ DbSet < TwitchUserConfig > TwitchUserConfig { get ; set ; }
46
46
47
47
/// <summary>
48
48
/// The twitch logs of users banned outside the bot.
49
49
/// </summary>
50
- public DbSet < TwitchUserBannedOutsideOfBotLogs > TwitchUserBannedOutsideOfBotLogs { get ; set ; }
50
+ DbSet < TwitchUserBannedOutsideOfBotLogs > TwitchUserBannedOutsideOfBotLogs { get ; set ; }
51
51
52
52
/// <summary>
53
53
/// The twitch logs of the user's chat.
54
54
/// </summary>
55
- public DbSet < TwitchUserChatLogs > TwitchUserChatLogs { get ; set ; }
55
+ DbSet < TwitchUserChatLogs > TwitchUserChatLogs { get ; set ; }
56
56
57
57
/// <summary>
58
58
/// Provides access to database related information and operations for this context.
59
59
/// </summary>
60
- public DatabaseFacade Database { get ; }
60
+ DatabaseFacade Database { get ; }
61
61
62
62
/// <summary>
63
63
/// Saves all changes made in this context to the database.
@@ -67,5 +67,13 @@ public interface INullinsideContext {
67
67
/// A task that represents the asynchronous save operation. The task result contains the
68
68
/// number of state entries written to the database.
69
69
/// </returns>
70
- public Task < int > SaveChangesAsync ( CancellationToken cancellationToken = default ) ;
70
+ Task < int > SaveChangesAsync ( CancellationToken cancellationToken = default ) ;
71
+
72
+ /// <summary>
73
+ /// Saves all changes made in this context to the database.
74
+ /// </summary>
75
+ /// <returns>
76
+ /// The number of state entries written to the database.
77
+ /// </returns>
78
+ int SaveChanges ( ) ;
71
79
}
0 commit comments