public async Task <bool> UpdateExamenAsync(ExamenEntity entity) { if (_dbConnection.State == ConnectionState.Closed) { _dbConnection.Open(); } var result = await _dbConnection.QueryAsync <bool>("UpdateExamen", new { IdExamen = entity.Id, entity.Nota, entity.VidasRestante, entity.TiempoRestante, entity.NumeroPreguntaActual, entity.FechaFinalizado }, commandType : CommandType.StoredProcedure); return(result.FirstOrDefault()); }
public async Task <int> CreateExamenAsync(ExamenEntity entity) { if (_dbConnection.State == ConnectionState.Closed) { _dbConnection.Open(); } var result = await _dbConnection.QueryAsync <int>("CreateExamen", new { entity.UsuarioKey, entity.IdEtapa, entity.IdCurso, entity.IdLeccion, entity.Nota, entity.VidasRestante, entity.NumeroPreguntaActual, entity.TiempoRestante }, commandType : CommandType.StoredProcedure); return(result.FirstOrDefault()); }