private Registration InsertRegistration(string[] requestItems) { Registration registration = new Registration(); registration.KtpNumber = requestItems[1]; registration.PhoneNumber = userPhoneNumber; registration.Address = requestItems[2]; registration.IsVerified = true; string query = string.Format("INSERT INTO registrations(ktpnumber, phonenumber, address) VALUES('{0}','{1}','{2}')", registration.KtpNumber, registration.PhoneNumber, registration.Address); conn.Execute(query); return registration; }
private User InsertUser(Registration registration) { User user = new User(); user.KtpNumber = registration.KtpNumber; user.PhoneNumber = registration.PhoneNumber; user.Address = registration.Address; string query = string.Format("INSERT INTO users(ktpnumber, phonenumber, address) VALUES('{0}','{1}','{2}')", user.KtpNumber, user.PhoneNumber, user.Address); conn.Execute(query); return user; }