- Paperback: 1018 pages
- Publisher: Apress; 6th ed. edition (September 16, 2016)
- Language: English
- ISBN-10: 1484203984
- ISBN-13: 978-1484203989
- Product Dimensions: 7 x 2.1 x 10 inches
- Shipping Weight: 4.3 pounds (View shipping rates and policies)
- Average Customer Review: 28 customer reviews
- Amazon Best Sellers Rank: #442,233 in Books (See Top 100 in Books)
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Pro ASP.NET Core MVC 6th ed. Edition
Use the Amazon App to scan ISBNs and compare prices.
"Enlightenment Now: The Case for Reason, Science, Humanism, and Progress"
Is the world really falling apart? Is the ideal of progress obsolete? Cognitive scientist and public intellectual Steven Pinker urges us to step back from the gory headlines and prophecies of doom, and instead, follow the data: In seventy-five jaw-dropping graphs, Pinker shows that life, health, prosperity, safety, peace, knowledge, and happiness are on the rise. Learn more
Frequently bought together
Customers who bought this item also bought
Customers who viewed this item also viewed
About the Author
Adam Freeman is an experienced IT professional who has held senior positions in a range of companies, most recently serving as chief technology officer and chief operating officer of a global bank. Now retired, he spends his time writing and long-distance running.
Top customer reviews
There was a problem filtering reviews right now. Please try again later.
However, the book has one gaping flaw around how it structures database access. Adam uses a strategy of defining an interface for data access and then implementing it with Entity Framework, which is all fine. However, he makes the terrible decision to expose the Entity Framework DbSets using IEnumerable<T> properties in his data access interface, and he does all filtering in the controller classes, which only access the database using this IEnumerable.
While this will compile and function, there is a huge, huge difference between the following statements:
DBSet<Product> products = ...;
var p1 = (products as IQueryable<Product>).Where(p => p.Category == "Sporting Goods").OrderBy(p => p.Id).Skip(20).Take(10);
var p2 = (products as IEnumerable<Product>).Where(p => p.Category == "Sporting Goods").OrderBy(p => p.Id).Skip(20).Take(10);
Both return a product collection of 10 products in the sporting goods category. However, the first one (using IQueryable) is a LINQ to Entities query that will bake the filter, ordering, skip, and take criteria right into the T-SQL query that is sent down to the database. The query to the database will return 10 rows, which will be materialized into 10 Product objects.
The second statement of these (using IEnumerable), while it eventually gives you the same 10 objects, is not using LINQ to Entities, it's a LINQ to Objects statement. It will select the entire Product table from the database, materialize every row to an object, and then sort, filter and discard all but 10 of those objects in memory. If you had 100,000 products in your SQL table, you would create and immediately discard 99,990 objects just to get the 10 you wanted, as well as reading every single row in your table for every operation.
Adam is upfront that this isn't a book on Entity Framework - but I do have to dock him some points for repeatedly erring in how he implemented the database access.
There are some areas that I wish were covered deeper (for example, Identity and Memory-based database for unit testing). But it's a 1000-page book already, so I realize that some things will be limited.
Given that API Controllers are now no different from regular controller, I think the chapter on API Controllers could be shorter. It goes into details of REST patterns that, while important, isn't specific to ASP.NET. Maybe a link to good resources would be sufficient. Or maybe I am just nitpicking. One nugget is the discussion how [FromBody] and similar attributes are required in API controllers and *why*!
I am looking forward to Freeman's upcoming Angular2 book that I hope will go into more details of using ASP.NET in SPA context (less Razor, less JQuery, more API Controllers).
One criticism would be that the author makes a lot of forward referencing statements to the effect of: "trust me, I'll explain more in Chapter 27". He delivers, but it is common to see these 15-20 chapter jumps between the practical application and the theory it relies on.