Exemplo n.º 1
0
        public void UpdateProfile(UpdateProfile profile)
        {
            using (var connection = GetConnection())
            {
                if (UserSecretsConfigurationExtensions.)
                {
                    connection.Execute("Update Student Set email_address = @emailAddress, mobile_number = @mobileNo where student_id = @Id", new { Id = SessionVar.GetInt("SID"), emailAddress = profile.Email, mobileNo = profile.Mobile });
                }

                if (User.lecturer)
                {
                    connection.Execute("Update Lecturer Set email_address = @emailAddress, contact_number = @mobileNo where lecturer_id = @Id", new { Id = SessionVar.GetInt("LID"), emailAddress = profile.Email, mobileNo = profile.Mobile });
                }
            }
        }