public User() { Profile = new UserProfile(); OAuth = new OAuthUser(); Roles = new List<Role>(); }
public void UpdateUserProfile(UserProfile profile) { using (var db = new DataAccess()) { db.CreateStoredProcCommand("dbo.UpdateUserProfile"); db.AddInputParameter("@UserId", DbType.Int32, profile.UserId); db.AddInputParameter("@LanguageId", DbType.String, profile.Lang.LanguageId); db.AddInputParameter("@Dob", DbType.String, profile.Dob); db.AddInputParameter("@Nationality", DbType.String, profile.Nationality); try { db.ExecuteNonQuery(); } catch (Exception ex) { Logger.Error("Error while updating user profile.", ex); throw; } } }