コード例 #1
0
        private async Task <ApplicationUser> GetUser(AbstractRosterStoreDbContext context)
        {
            var um = new UserManager <ApplicationUser> (
                new UserStore <ApplicationUser> (context));

            return(await um.FindByIdAsync(user));
        }
コード例 #2
0
        private async Task <string> SaveNextVersion(AbstractRosterStoreDbContext context)
        {
            var user = await GetUser(context);

            user.RosterVersion = NextVersion(user.RosterVersion);
            await context.MySaveChanges();

            return(VersionString(user.RosterVersion));
        }
コード例 #3
0
 private async Task <int> NextVersion(AbstractRosterStoreDbContext context)
 {
     return(NextVersion(await CurrentVersion(context)));
 }
コード例 #4
0
 private async Task <int> CurrentVersion(AbstractRosterStoreDbContext context)
 {
     return((await GetUser(context)).RosterVersion);
 }