The code for the Footer as show on the top of page 73 is:
Code:
@RenderPage("~/Shared/_Footer.cshtml", new (Year = DateTime.Now.Year))
This gave me two errors:
(1) "Compiler Error Message: CS1031: Type expected"
And then, after I added a type:
(2) "Compiler Error Message: CS0103: The name 'Year' does not exist in the current context"
The code that worked finally:
Code:
@RenderPage("~/Shared/_Footer.cshtml", new DateTime (Page.Year = DateTime.Now.Year))
I couldn't find the errata, is this an error in the code in the book (which, I think, is very good, in every aspect!)?