Ejemplo n.º 1
0
 public void StopNotificationsForPosts(int categoryId, bool isVisible)
 {
     using (var db = new BlogDbContext())
     {
         db.StopNotifications(Context, db.Posts, new { CategoryId = categoryId, IsVisible = isVisible });
     }
 }
Ejemplo n.º 2
0
        // Ideas for property map parameter definition
        //db.StartNotifications(Context, db.Posts, new Dictionary<string, object> { { "CategoryId", categoryId } });
        //db.StartNotifications(Context, db.Posts, new { CategoryId = categoryId, IsVisible = isVisible });
        //db.StartNotifications(Context, db.Posts, p => p.CategoryId == categoryId, p => p.IsVisible);
        //db.StartNotifications(Context, db.Posts, p => p.CategoryId == categoryId && p.IsVisible);

        public void StopNotificationsForPosts(int categoryId)
        {
            using (var db = new BlogDbContext())
            {
                db.StopNotifications(Context, db.Posts, new { CategoryId = categoryId });
            }
        }