コード例 #1
0
ファイル: PostsLogic.cs プロジェクト: nmt1994/MyAPI
        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;
        }
コード例 #2
0
 partial void DeletePosts(Posts instance);
コード例 #3
0
 partial void UpdatePosts(Posts instance);
コード例 #4
0
 partial void InsertPosts(Posts instance);
コード例 #5
0
		private void detach_Posts(Posts entity)
		{
			this.SendPropertyChanging();
			entity.AspNetUser = null;
		}
コード例 #6
0
		private void attach_Posts(Posts entity)
		{
			this.SendPropertyChanging();
			entity.AspNetUser = this;
		}