Example #1
0
        private static void AddandEdit()
        {
            var Post1 = new Post
            {
                Title       = "Testing the Add",
                CreatedDate = DateTime.Now,
                Body        = "This is a means of testing the add from IRepository"
            };

            var Post2 = new Post
            {
                Title       = "Testing the Add",
                CreatedDate = DateTime.Now,
                Body        = "This is a means of testing the Edit from IRepository"
            };



            var context = new BlogRepository <BlogDBContext, Post>();

            context.Add(Post2);
            Post2.Title = "Testing the Edit";
            context.Edit(Post2);
        }
Example #2
0
        private static void Delete()
        {
            var context = new BlogRepository <BlogDBContext, Post>();

            context.Delete(3);
        }