People vary as to what they mean by the start of a week, but for example if you think a week starts on Monday:
var week = DateTime.Today;
while(week.DayOfWeek != DayOfWeek.Monday)
week = week.AddDays(-1);
return database.ExecuteScalar<int>("SELECT count(*) FROM Book WHERE bookEntryTime > ?;", week);
You could also straight to the math:
var week = DateTime.Today.AddDays(-(((int)DateTime.Today.DayOfWeek+6)%7));
return database.ExecuteScalar<int>("SELECT count(*) FROM Book WHERE bookEntryTime > ?;", week);
But to me it's relatively non-self-documenting for little performance advantage
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…