Tip: Use the LINQ methods that take a predicate
Instead of this:
var author = (from a in dataContext.Authors where a.Id == authorId select a).Single();…use this:
var author = dataContext.Authors.Single(a => a.Id == authorId);Also consider whether you wanted SingleOrDefault.