/// <summary> /// Deletes all the Notifications for a particular User /// </summary> /// <param name="id">The User ID</param> public void DeleteByUserId(int id) { var entities = _context.Notifications.Where(n => n.ReciverId == id); _context.RemoveRange(entities); _context.SaveChanges(); }