public void StopNotificationsForPosts(int categoryId, bool isVisible) { using (var db = new BlogDbContext()) { db.StopNotifications(Context, db.Posts, new { CategoryId = categoryId, IsVisible = isVisible }); } }
// 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 }); } }