Question: I'm looking to change notifications settings for a single application remotely.
I've got the device enrolled into a MDM.
Android device running 6.01.

I can remotely deploy / update apps etc...
However, I want to disable notifications for this. I can't seem to find a hands off approach to doing this.

I'd have to break out of the end user lock down application.
Go to settings
apps
find app
notifications
block
restart device.

Is there a way I can remotely make this change?

Thanks in advance.

Answer: 
I don't know since which version of EFCore it's possible, but there's a simpler single-query alternative now:

```
context.Topic
   .SelectMany(topic => topic.Posts.OrderByDescending(z => z.CreatedDate).Take(1),
        (topic, post) => new {topic.Id, topic.Title, post.Text, post.CreatedDate})
   .OrderByDescending(x => x.CreatedDate)
   .ToList();

```
In EF Core 2.1 GroupBy LINQ operator only support translating to the SQL GROUP BY clause in most common cases. Aggregation function like sum, max ...

[**linq-groupby-translation**](https://learn.microsoft.com/en-us/ef/core/what-is-new/ef-core-2.1#linq-groupby-translation)

You can until full support group by in EF Core use [**Dapper**](https://github.com/StackExchange/Dapper)