In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text are shown as follows: "We can include other contexts through the use of the include
directive."
A block of code is set as follows:
{ [TestClass] public class QueryTests { [TestMethod] public void ShouldReturnRecordsFromTheDatabase() { //Arrange var init = new Initializer(); var context = new BlogContext(Settings.Default.BlogConnection); init.InitializeDatabase(context); IBlogRepository repo = new BlogRepository(context); //Act var items = repo.Set<Blog>().FilterByBlogName("Test"); //Assert Assert.AreEqual(2, items.Count()); } }
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
{
public class Blog
{
public int Id { get; set; }
public DateTime Creationdate { get; set; }
public string ShortDescription { get; set; }
public string Title { get; set; }
public double Rating { get; set; }
}
}
New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Open the Improving Collection Property Validation solution in the included source code examples."