public async Task <BallotRequest> BallotRequestGetById(IDbConnection context, Guid Id) { BallotRequest result = null; try { result = await this.ballotService.BallotRequestGetById(context, Id); } catch { throw; } return(result); }
public async Task <BallotRequest> BallotRequestInsert(IDbConnection context, BallotRequest ballotRequest) { BallotRequest result = null; try { result = await this.ballotService.BallotRequestInsert(context, ballotRequest); } catch (Exception ex) { Debug.WriteLine(ex.Message); throw; } return(result); }
public async Task <BallotRequest> Insert([FromBody] BallotRequest ballotRequest) { BallotRequest result = null; try { result = await this.ballotRepository.BallotRequestInsert(Context, ballotRequest); } catch (Exception ex) { Debug.WriteLine(ex.Message); throw; } finally { } return(result); }
public async Task <BallotRequest> BallotRequestInsert(IDbConnection context, BallotRequest ballot) { try { var p = new DynamicParameters(); p.Add("@id", Guid.NewGuid(), DbType.Guid, ParameterDirection.Input); p.Add("@electionid", ballot.ElectionId, DbType.Guid, ParameterDirection.Input); p.Add("@deviceid", ballot.DeviceId, DbType.String, ParameterDirection.Input); BallotRequest ans = await context.QuerySingleAsync <BallotRequest>(sql : "BallotRequest_Insert", param : p, commandType : System.Data.CommandType.StoredProcedure); return(ans); } catch (Exception ex) { Debug.WriteLine(ex.Message); throw; } }
public async Task <BallotRequest> BallotRequestGetById(Guid Id) { BallotRequest result = await this.ballotRepository.BallotRequestGetById(Context, Id); return(result); }