public async Task <BallotModel> InsertBallotAsync(VoterModel voter, DateTime enteredAt) { await Task.CompletedTask; using (var tableAdapter = new BallotTableAdapter()) { tableAdapter.Insert( string.Empty, enteredAt, null, voter.Id ); } return(await GetBallotByVinAsync(voter.ElectionId, voter.Vin)); }
public static void InsertData(Ballot ballot) { _tableAdapter.Insert(ballot.UserID, ballot.Code); _dictionary.Add(ballot.UserID, ballot); }