Updated: 41 min 2 sec ago
If you want to know what your next call to SaveChanges is going to do to your database then you want to use Entity Framework's ChangeTracker.
If you're testing for exceptions using ExpectedException, you have a better alternative.
Odds are that, when you stop on some breakpoint, you want to check the value in some variables. Here's how to get Visual Studio to display those values for you.
Here's how to add headers or modify the content of requests and responses in the ASP.NET pipeline's modules and handlers.
Sure, F12 will take you to the definition of whatever your cursor is sitting on. But that's just the start.
It's a lot easier in ASP.NET Core to let the client know that everything went right (or wrong).
Peter doesn’t see why the next UI you create (for the Web or for the desktop or for your mobile device) won’t be created in Xamarin.Forms. Or why that wouldn’t be your next career move.
If you’re going to write comments then you might as well avoid embarrassing yourself.
Peter shares a great tool that not only makes your application run faster but gives you insight into other potential problems.
The Blazor documentation doesn't say you can't do this and it does actually work. But, still, you'd probably be foolish to take advantage of it.
You've got a class that accepts an object from a client (perhaps, that class is an ASP.NET MVC Controller). Here's the simplest way to update the related Entity Framework object with the client's data before saving it to your database.
Peter thinks he's a bad person for even mentioning this tip. But, he claims, sometimes your best option in testing is to look at the internal state of the code under test. PrivateObject and PrivateType will let you do that.
You're probably perfectly happy with the layout of windows that Visual Studio is giving you (it's whatever window layout you last used). But if you think there's a more optimal layout, it's easy to change. And if there's a couple of layouts you like ... well, you can have them, also.
Model binding works great ... but it sometimes lets me down. In those cases you need to tell model binding to do the right thing. Here's an attribute that will let you know when you're missing non-nullable data and do it without interfering with your data design.