Extracting opening and closing times for each day of the week I have these two methods: 

private static OpeningDay GetUsallyOpeningHour(List&lt;OpeningDay&gt; openingHoursDaily, DayOfWeek dayOfWeek)
{
    var listOfSpecificDayOfWeek = openingHoursDaily.Where(x =&gt; x.DateTime.DayOfWeek == dayOfWeek);

    if(listOfSpecificDayOfWeek.Any())
        return listOfSpecificDayOfWeek.GroupBy(x =&gt; x.From).OrderByDescending(x =&gt; x.Count()).ThenByDescending(x =&gt; x.Key).First().First();

    return new OpeningDay { From = new TimeSpan(0, 0, 0), To = new TimeSpan(0, 0, 0), DateTime = DateTime.Now };
}

private static OpeningDay GetUsallyClosingHour(List&lt;OpeningDay&gt; openingHoursDaily, DayOfWeek dayOfWeek)
{
    var listOfSpecificDayOfWeek = openingHoursDaily.Where(x =&gt; x.DateTime.DayOfWeek == dayOfWeek);

    if (listOfSpecificDayOfWeek.Any())
        return listOfSpecificDayOfWeek.GroupBy(x =&gt; x.To).OrderByDescending(x =&gt; x.Count()).ThenByDescending(x =&gt; x.Key).First().First();

    return new OpeningDay { From = new TimeSpan(0, 0, 0), To = new TimeSpan(0, 0, 0), DateTime = DateTime.Now };
}


The only difference between them is that one is grouping by x.From and other by x.To, and I was wondering how I can improve this code. 

Basically, I can a create method which takes lambda, but how long? At first I was thinking to pass this:

GroupBy(x =&gt; x.To).OrderByDescending(x =&gt; x.Count()).ThenByDescending(x =&gt; x.Key)


as a lambda parameter. But this would take me ending with function that takes a lambda and then returns sth like lambda.First().First().

What do you recommend? Are there some other improvements?
Your thinking is good: it's a small difference but... there is a difference. And you have to find a way to extract the difference out of the methods and try create a parameter from this. Small example:

public class User
{
    public int Id { get; set; }
    public string Name { get; set; }
    public int Value { get; set; }
}


We could then group them by Id or Value for example:

public Item GetItemGroupedByName(List&lt;Item&gt; items)
{
    return items.GroupBy(x =&gt; x.Id).First().First();
}

public Item GetItemGroupedByValue(List&lt;Item&gt; items)
{
    return items.GroupBy(x =&gt; x.Value).First().First();
}


This gives the same kind of situation like yours. Luckily there's the Func&lt;T, TResult&gt; Delegate. The method can now look like this:

public Item GetItemGrouped(List&lt;Item&gt; items, Func&lt;Item, int&gt; rule)
{
    return items.GroupBy(rule).First().First();
}


And you call it like this:

GetItemGrouped(list, x =&gt; x.Value);
//or:
GetItemGrouped(list, x =&gt; x.Id);


Of course you can't group by Name in this case as it is a string property and the Func expects an integer. You might change the int to object, but please don't as that is hacky code. Since the purpose of your method is to group by a TimeSpan, you can implement this easily:

private static OpeningDay GetUsallyOpeningHour(List&lt;OpeningDay&gt; openingHoursDaily,
                                               DayOfWeek dayOfWeek,
                                               Func&lt;OpeningDay, TimeSpan&gt; groupByRule)
{
    var listOfSpecificDayOfWeek = openingHoursDaily.Where(x =&gt; x.DateTime.DayOfWeek == dayOfWeek);

    if(listOfSpecificDayOfWeek.Any())
        return listOfSpecificDayOfWeek.GroupBy(groupByRule)
                                      .OrderByDescending(x =&gt; x.Count())
                                      .ThenByDescending(x =&gt; x.Key)
                                      .First().First();

    return new OpeningDay { From = new TimeSpan(0, 0, 0), To = new TimeSpan(0, 0, 0), DateTime = DateTime.Now };
}


And now you can call the method like:

var openingDay = GetUsallyOpeningHour(openingHours, DayOfWeek.Thursday, x =&gt; x.From);
//or:
var openingDay = GetUsallyOpeningHour(openingHours, DayOfWeek.Thursday, x =&gt; x.To);