コード例 #1
0
        public HttpResponseMessage newUserProfile(Entities.UserProfile add)
        {
            try
            {
                byte[] imageArray = add.ProfilePicture;

                Data.AspNetUser newUserProfile = new Data.AspNetUser();
                newUserProfile.ProfilePhoto = new Binary(imageArray);
                db.AspNetUsers.InsertOnSubmit(newUserProfile);
                db.SubmitChanges();

                return(Request.CreateResponse(HttpStatusCode.OK));
            }
            catch (Exception e)
            {
                Debug.WriteLine(e);
                return(Request.CreateResponse(HttpStatusCode.BadRequest));
            }
        }
コード例 #2
0
 /// <summary>Create (INSERT) user profile.</summary>
 public Entities.UserProfile CreateUserProfile(Entities.UserProfile p)
 {
     throw new NotImplementedException();
 }
コード例 #3
0
 /// <summary>Remove (DELETE) user profile permanently.</summary>
 public void RemoveUserProfile(Entities.UserProfile p)
 {
     throw new NotImplementedException();
 }