MSDN Blogs

An Ad Hoc Approach to Passing Elements from Blazor to JavaScript

Thu, 12/06/2018 - 12:53
Here's a tool to help you integrate Blazor and JavaScript by passing HTML elements defined in Blazor to JavaScript functions.
Categories: Microsoft

Check to See What's Changed in Entity Framework

Tue, 11/27/2018 - 11:19
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.
Categories: Microsoft

A Better Way to Test for Exceptions in Visual Studio

Fri, 11/16/2018 - 13:34
If you're testing for exceptions using ExpectedException, you have a better alternative.
Categories: Microsoft

Making Breakpoints Useful in Visual Studio

Tue, 11/13/2018 - 11:03
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.
Categories: Microsoft

Updating Request Messages in ASP.NET Handlers and Modules

Mon, 11/05/2018 - 12:20
Here's how to add headers or modify the content of requests and responses in the ASP.NET pipeline's modules and handlers.
Categories: Microsoft

Skipping Through Definitions and References in Visual Studio

Mon, 10/29/2018 - 13:46
Sure, F12 will take you to the definition of whatever your cursor is sitting on. But that's just the start.
Categories: Microsoft

Returning Status Codes from ASP.NET Core Controllers

Fri, 10/26/2018 - 15:28
It's a lot easier in ASP.NET Core to let the client know that everything went right (or wrong).
Categories: Microsoft

Leveraging and Testing Script Bundles with Content Delivery Networks

Thu, 10/25/2018 - 10:57
You can mix script files from CDNs with your own local files, but it can be difficult to test the result to see if your code works. Here's how to both bundle JavaScript from a CDN and check to see if it's being done right.
Categories: Microsoft

Job Tip: Does the Future Belong to Xamarin.Forms?

Wed, 10/17/2018 - 12:01
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.
Categories: Microsoft

Spell Check Your Comments in Visual Studio

Tue, 10/16/2018 - 10:31
If you’re going to write comments then you might as well avoid embarrassing yourself.
Categories: Microsoft

Speeding Up SQL Server: Planning for One-Time Queries

Mon, 10/15/2018 - 11:44
Peter shares a great tool that not only makes your application run faster but gives you insight into other potential problems.
Categories: Microsoft

A Blazor Tip You Should Almost Certainly Ignore

Wed, 10/10/2018 - 10:00
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.
Categories: Microsoft

Updating Entity Framework Objects with Changed Data

Thu, 10/04/2018 - 12:09
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.
Categories: Microsoft

.NET Tip: Testing Private Fields

Wed, 10/03/2018 - 12:29
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.
Categories: Microsoft

Controlling Your Visual Studio Default Window Layout

Thu, 09/27/2018 - 11:58
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.
Categories: Microsoft

Controlling Model Binding in ASP.NET Core

Mon, 09/17/2018 - 11:23
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.
Categories: Microsoft