public static Posts getPostById(int id) { Posts targetPost = postContext.Posts.Where(i => i.Id == id).Single(); Posts newPost = new Posts() { Id = targetPost.Id, UserId = targetPost.UserId, Content = targetPost.Content, JsonPicture = targetPost.JsonPicture }; return newPost; }
partial void DeletePosts(Posts instance);
partial void UpdatePosts(Posts instance);
partial void InsertPosts(Posts instance);
private void detach_Posts(Posts entity) { this.SendPropertyChanging(); entity.AspNetUser = null; }
private void attach_Posts(Posts entity) { this.SendPropertyChanging(); entity.AspNetUser = this; }