Exemplo n.º 1
0
        public async Task <TrainerAppointment> ProcessAppointmentAsync(TrainerAppointment appointment)
        {
            try
            {
                var connection = await _dbConnectionFactory.CreateConnectionAsync();

                await connection.ExecuteAsync("Insert into User (Id, UserName, Password, ConfirmPassword, Email, Photo) VALUES (@id, @userName,@password,@confirmPassword,@email,@photo)", new { id = user.Id, userName = user.UserName, password = user.Password, confirmPassword = user.ConfirmPassword, email = user.Email, photo = user.Photo });

                return(user);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
        }
Exemplo n.º 2
0
 public Task <TrainerAppointment> ProcessAppointment(TrainerAppointment appointment)
 {
     _appointment = _appointmentRepository.ProcessAppointment(appointment);
     return(_appointment);
 }