Example #1
0
        public Int32 AddPost(Int32 blogid, String username, String password, String title, String content, String[] tags)
        {
            BlogEntry entry = new BlogEntry();
            entry.BlogFeed_ID = blogid;
            entry.Content = content;
            entry.Author = "Billy Coover";
            entry.Published = DateTime.Now;
            entry.Title = title;
            entry.Content = content;

            db.BlogEntries.InsertOnSubmit(entry);
            db.SubmitChanges();

            //BlogCategory cat;
            //foreach (var item in tags)
            //{
            //    cat = new BlogCategory { Category = item };
            //    db.BlogEntryCategories.InsertOnSubmit(
            //    db.SubmitChanges();
            //}

            return entry.BlogEntry_ID;
        }
 partial void DeleteBlogEntry(BlogEntry instance);
 partial void UpdateBlogEntry(BlogEntry instance);
 partial void InsertBlogEntry(BlogEntry instance);
		private void detach_BlogEntries(BlogEntry entity)
		{
			this.SendPropertyChanging();
			entity.BlogFeed = null;
		}