I have a ViewModel looks like this :
public int AllRecords { get; set; }
public int IsActiveRecords { get; set; }
public int IsDeletedRecords { get; set; }
public List<Setup_Country> Countries { get; set; }
Is it possible to write a single query using Entity Framework to get these data from database ?
If not , then what is the best way to do this ?

Setup_Countryitems?var countries = db.Setup_Countries.ToList(); var model = new ViewModel { Countries = countries, AllRecords = countries.Count, IsDeletedRecords = countries.Count(x => x.IsDeleted), ... }