-
-
Notifications
You must be signed in to change notification settings - Fork 551
/
IDb.cs
68 lines (58 loc) · 1.81 KB
/
IDb.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
* Copyright (c) .NET Foundation and Contributors
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*
* http://github.com/piranhacms/piranha
*
*/
using System;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
using Piranha.AspNetCore.Identity.Data;
namespace Piranha.AspNetCore.Identity
{
public interface IDb
{
/// <summary>
/// Gets/sets the users set.
/// </summary>
DbSet<User> Users { get; set; }
/// <summary>
/// Gets/sets the roles set.
/// </summary>
DbSet<Role> Roles { get; set; }
/// <summary>
/// Gets/sets the user claims set.
/// </summary>
DbSet<IdentityUserClaim<Guid>> UserClaims { get; set; }
/// <summary>
/// Gets/sets the user roles set.
/// </summary>
DbSet<IdentityUserRole<Guid>> UserRoles { get; set; }
/// <summary>
/// Gets/sets the user roles set.
/// </summary>
DbSet<IdentityUserLogin<Guid>> UserLogins { get; set; }
/// <summary>
/// Gets/sets the roles claims set.
/// </summary>
DbSet<IdentityRoleClaim<Guid>> RoleClaims { get; set; }
/// <summary>
/// Gets/sets the user tokes set.
/// </summary>
DbSet<IdentityUserToken<Guid>> UserTokens { get; set; }
/// <summary>
/// Saves the changes made to the context.
/// </summary>
/// <returns></returns>
int SaveChanges();
/// <summary>
/// Saves the changes made to the context.
/// </summary>
Task<int> SaveChangesAsync(CancellationToken cancellationToken = default(CancellationToken));
}
}