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)); } }
/// <summary>Create (INSERT) user profile.</summary> public Entities.UserProfile CreateUserProfile(Entities.UserProfile p) { throw new NotImplementedException(); }
/// <summary>Remove (DELETE) user profile permanently.</summary> public void RemoveUserProfile(Entities.UserProfile p) { throw new NotImplementedException(); }