protected void Page_Load(object sender, EventArgs e) { Master.selected = "default"; string connectionString = ConfigurationManager.ConnectionStrings["iPortendConnectionString"].ConnectionString; Facebook.Schema.user u = Master.Api.Users.GetInfo(); string userid = u.uid.ToString(); string username = u.first_name; lblInfo.Text = "Welcome to iPortend beta!" + " uid = " + userid + " name = " + username; //CheckExist(userID); PredictionRepository repo = new PredictionRepository(); var FaceUser = repo.CheckUser(userid); if (FaceUser.Count() == 0) { PreMembership member = new PreMembership(); member.UserId = new Guid(); member.UserType = 1; member.UserFaceID = u.uid.ToString(); repo.AddUser(member); repo.Save(); } Category.DataSource = repository.categoryList(); Category.DataTextField = "Description"; Category.DataValueField = "CategoryID"; Category.DataBind(); }
partial void DeletePreMembership(PreMembership instance);
partial void UpdatePreMembership(PreMembership instance);
partial void InsertPreMembership(PreMembership instance);
public void AddUser(PreMembership member) { dataContext.PreMemberships.InsertOnSubmit(member); }