Esempio n. 1
0
 public async Task <Models.Database.VoteSelfRegistration> UpdateRegistration(Models.Database.VoteSelfRegistration voteRegistration)
 {
     using (var context = new toafcContext())
     {
         context.VoteSelfRegistrations.Update(voteRegistration);
         await context.SaveChangesAsync();
     }
     return(voteRegistration);
 }
Esempio n. 2
0
 public async Task <IActionResult> UpdateVoterRegistration([FromBody] Models.Database.VoteSelfRegistration voteRegistration)
 {
     try
     {
         return(Json(await voterRegistration.UpdateVoterRegistration(voteRegistration)));
     }
     catch (Exception e)
     {
         return(StatusCode(500, e));
     }
 }
Esempio n. 3
0
        public async Task <Models.Database.VoteSelfRegistration> UpdateVoterRegistration(Models.Database.VoteSelfRegistration voteRegistration)
        {
            Exceptions.TestForNull(voteRegistration, nameof(voteRegistration));

            voteRegistration = await voteRegistrationDB.UpdateRegistration(voteRegistration);

            _cacheOperation.Delete(cacheKey);
            return(voteRegistration);
        }