Showing WebAPI Validation Errors with ExtJS 6

Let’s say you use model validation with ASP.NET WebAPI and you are serving a client side application written in Sencha’s ExtJS.  To show those errors like this:


You need to add a ValidationActionFilter to your startup code as follows:

And then, you can have your ExtJS code do something like the following to display the error:

And you can run it yourself at the Sencha Fiddle:


A Short Video Tutorial on How To Fade in and out with Adobe Premiere

Check out this short 90 second video on how to add audio fade in and fade out on an instructional video.  I do this on my current video I’m making for Pluralsight on ASP.NET Multi-Tenant coming out soon.

Converting a Controller Method in MVC5 to async

I’m currently working on a Pluralsight course on ASP.NET and I have to admit I’m slow to adopt async methods in my code because it feels a little complex when non-async code is what I’m use to.  I’m feeling like since I’m doing this Pluralsight course I should really show best practices and clearly async controller methods is no doubt a best practice.

I’m surprised it was actually so easy.  First, let me show you the code that I had written that is not async that I’m sure you are all familiar with.

All I had to change (besides adding the async name space for Task) was to have speakers return a task with the ToListAsync method and change the signature of the method to return a task. Here is the updated code that is now fully async.

Using map instead of a for loop in ECMAScript 5 JavaScript




Just Sayin…

Plugin by Social Author Bio


Get every new post delivered to your Inbox

Join other followers: