Inheritance: INotifyPropertyChanging, INotifyPropertyChanged
 partial void DeleteUserProfile(UserProfile instance);
 partial void InsertUserProfile(UserProfile instance);
 partial void UpdateUserProfile(UserProfile instance);
Ejemplo n.º 4
0
        public static UserProfile Save(UserProfile profile)
        {
            if (profile.UserId == 0)
            {
                //save the user.
                using (ExamSystemDataContext db = new ExamSystemDataContext())
                {
                    db.UserProfiles.InsertOnSubmit(profile);
                    db.SubmitChanges();
                }

            }
            else
            {
                //update user
            }
            return null;
        }