Are you over 18 and want to see adult content?
More Annotations
A complete backup of proefdiervrij.nl
Are you over 18 and want to see adult content?
A complete backup of clubskisportief.com
Are you over 18 and want to see adult content?
A complete backup of afabulousfete.com
Are you over 18 and want to see adult content?
A complete backup of findingrover.com
Are you over 18 and want to see adult content?
A complete backup of travelonthebrain.net
Are you over 18 and want to see adult content?
A complete backup of christianpost.com
Are you over 18 and want to see adult content?
Favourite Annotations
A complete backup of smartsourcetv.com
Are you over 18 and want to see adult content?
A complete backup of worldofdance.com
Are you over 18 and want to see adult content?
A complete backup of rschooltoday.com
Are you over 18 and want to see adult content?
Text
and
HOW TO USE ROUTING IN ASP.NET CORE 3.0 RAZOR PAGESSEE MORE ON EXCEPTIONNOTFOUND.NET QUICKSORT IN C#STABLE? Â NOBEST-CASE: Â O(N LOG N)SEE MORE ON EXCEPTIONNOTFOUND.NET USING MIDDLEWARE IN .NET 5.0 TO LOG REQUESTS AND RESPONSES The presentation of .NET 5.0 to the wider world has given me the opportunity to dive deeper into some of its features while building an app that will be used in the real world, a rare opportunity I'm loathe to waste. So, my team and I built a new EXPLORING BLAZOR BY MAKING AN HTML TABLE SORTABLE IN .NET CORESEE MORE ON EXCEPTIONNOTFOUND.NET USING ANTI-FORGERY TOKENS IN ASP.NET 5.0 RAZOR PAGESSEE MORE ON EXCEPTIONNOTFOUND.NET EXCEPTION NOT FOUNDABOUTAUTHORSGUEST WRITERSMEMBERSHIP Currently sponsored by: Syncfusion's 70+ native Blazor controls give apps a superior UI with a fast DataGrid, Charts, Scheduler, and more. Start a free trial now. THE REPOSITORY-SERVICE PATTERN WITH DI AND ASP.NET CORESEE MORE ON EXCEPTIONNOTFOUND.NET MODELSTATE IN ASP.NET 5.0 MVC ModelState is a property of a Controller instance, and can be accessed from any class that inherits from Microsoft.AspNetCore.Mvc.Controller. The ModelState has two purposes: to store and submit POSTed name-value pairs, and to store the validation errors associated with each value. All right, enough of the boring explanation. IACTIONRESULT AND ACTIONRESULT Next up in our ASP.NET Core Demystified series, we will discuss and demo a whole bunch of classes which implement the IActionResult interface and inherit from the corresponding ActionResult class.These classes are used as responses from controller actions, and include redirecting to another site, redirecting to a different controller action, returning a JSON object, and returning a file to the RENDERING A BOOTSTRAP POPOVER USING ASP.NET CORE RAZOR Summary. We can use jQuery AJAX calls to render a dedicated Razor Page as the content of a Bootstrap popover in our ASP.NET Core apps. Remember the following: We need to create a dedicated Razor Page that will only display the contents of the popover. This dedicated page needs to have Layout set to null. The AJAX call needs to set the URL,and
HOW TO USE ROUTING IN ASP.NET CORE 3.0 RAZOR PAGESSEE MORE ON EXCEPTIONNOTFOUND.NET QUICKSORT IN C#STABLE? Â NOBEST-CASE: Â O(N LOG N)SEE MORE ON EXCEPTIONNOTFOUND.NET USING MIDDLEWARE IN .NET 5.0 TO LOG REQUESTS AND RESPONSES The presentation of .NET 5.0 to the wider world has given me the opportunity to dive deeper into some of its features while building an app that will be used in the real world, a rare opportunity I'm loathe to waste. So, my team and I built a new EXPLORING BLAZOR BY MAKING AN HTML TABLE SORTABLE IN .NET CORESEE MORE ON EXCEPTIONNOTFOUND.NET USING ANTI-FORGERY TOKENS IN ASP.NET 5.0 RAZOR PAGESSEE MORE ON EXCEPTIONNOTFOUND.NET HTTP STATUS CODES IN ASP.NET WEB API HTTP implements a wide variety of status codes, which are grouped into five categories. The five categories are distinguished by the code's first number, like so: 1XX Codes: Informational codes. Rarely used in modern web apps. 2XX Codes: Success codes. Tells the client that therequest succeeded.
C# IN SIMPLE TERMS
Project for this post: 6Methods Methods. A method in C# is a code block which takes inputs and optionally returns an output.A method may also be called a function.. Methods have five parts: An access modifier (e.g. public, private, etc.) A return type; A name. An optional set of parameters.; A collection of code statements bounded by curly braces { }. USING XUNIT THEORY AND INLINEDATA TO TEST C# EXTENSION METHODS Using XUnit Theory and InlineData to Test C# Extension Methods. In this final part of my unit testing series, we're going to take a single extension method and show how we can use XUnit's Theory attribute and InlineData attribute to quickly write a bunch of tests for that method. Oh don't worry, our test won't even be this hard. UNIT TESTING ASP.NET 5.0 MVC CONTROLLERS WITH MOQ AND XUNIT UPDATE (8 Jun 2021): This series has been updated to use ASP.NET 5.0. It previously used ASP.NET Core 3.0. Let's continue our unit test extravaganza by writing a set of unit tests for our ASP.NET 5.0 MVCControllers!
SETTING THE PAGE TITLE IN A BLAZOR APP This post is gonna be a short one (hence the Tips tag), but it implements something I wish was natively supported in Blazor: setting the page title!. That's right, we're going to see how to take something that used to be a single line of code and make it *counts on fingers* 17 lines of code! USING ANTI-FORGERY TOKENS IN ASP.NET 5.0 RAZOR PAGES The purpose of using anti-forgery tokens is to prevent cross-site request forgery (CSRF) attacks. It does this by submitting two different values to the server on any given POST, both of which must exist in order for the server to allow the request. One of those values is submitted as a cookie, and the other as form data. FIXING INTELLISENSE AND GO TO DEFINITION IN VISUAL STUDIO 2019 I had a set of very strange problems after upgrading to Visual Studio 2019 early this week, and they were significantly hampering my ability to get work done. Go To Definition didn't work for a great many classes, methods, and properties.Intellisense was straight-up missing in multiple places.I hadn't IMPLEMENTING POST-REDIRECT-GET IN ASP.NET CORE RAZOR PAGES I've written before about implementing a pattern known as POST-REDIRECT-GET in my ASP.NET MVC apps, and since my team and I are working on a new ASP.NET Core Razor Pages project I thought it might be useful to see if such a pattern can be implemented there.. Don't stare; you might see things you wish you hadn't. Like F#. Photo by Paweł Czerwiński / Unsplash HOW TO USE ATTRIBUTE ROUTING IN ASP.NET CORE 3.0 MVC Setup. In order to use attribute routing in ASP.NET Core 3.0, we need to do two things in our Startup.cs file. First, just like with convention-based routing, we need to include the MVC controllers and views in the service layer: Next, we need to call the new MapControllers () method inside of the UseEndpoints () method: TheMapControllers
ASPNETCORE_ENVIRONMENT Within the span of an hour, it had all gone to hell. The first deployment went rather smoothly. It was a fix to an existing webservice, and went out with no problems, or so we thought. EXCEPTION NOT FOUNDABOUTAUTHORSGUEST WRITERSMEMBERSHIP Currently sponsored by: Syncfusion's 70+ native Blazor controls give apps a superior UI with a fast DataGrid, Charts, Scheduler, and more. Start a free trial now. USING MIDDLEWARE IN .NET 5.0 TO LOG REQUESTS AND RESPONSES The presentation of .NET 5.0 to the wider world has given me the opportunity to dive deeper into some of its features while building an app that will be used in the real world, a rare opportunity I'm loathe to waste. So, my team and I built a new DRAWING WITH FABRICJS AND TYPESCRIPT PART 1: INTRO, GOALSSEE MORE ON EXCEPTIONNOTFOUND.NET QUICKSORT IN C#STABLE? Â NOBEST-CASE: Â O(N LOG N)SEE MORE ON EXCEPTIONNOTFOUND.NET THE REPOSITORY-SERVICE PATTERN WITH DI AND ASP.NET CORESEE MORE ON EXCEPTIONNOTFOUND.NET USING ANTI-FORGERY TOKENS IN ASP.NET 5.0 RAZOR PAGESSEE MORE ON EXCEPTIONNOTFOUND.NET USING A DAPPER BASE REPOSITORY IN C# TO IMPROVE READABILITY Currently sponsored by: Syncfusion's 70+ native Blazor controls give apps a superior UI with a fast DataGrid, Charts, Scheduler, and more. Start a free trial now.ASP.NET MVC
Hello Dear Reader! Want to get the best C#, ASP.NET, web tech, tips, and stories anywhere on the Web? Sign up to receive my premium newsletter The Catch Block! Each Wednesday, you'll get the best reads, job listings, stories, tips, and news from around the ASP.NET and C#worlds.
SETTING THE PAGE TITLE IN A BLAZOR APP This post is gonna be a short one (hence the Tips tag), but it implements something I wish was natively supported in Blazor: setting the page title!. That's right, we're going to see how to take something that used to be a single line of code and make it *counts on fingers* 17 lines of code! FIXING INTELLISENSE AND GO TO DEFINITION IN VISUAL STUDIO 2019 I had a set of very strange problems after upgrading to Visual Studio 2019 early this week, and they were significantly hampering my ability to get work done. Go To Definition didn't work for a great many classes, methods, and properties.Intellisense was straight-up missing in multiple places.I hadn't EXCEPTION NOT FOUNDABOUTAUTHORSGUEST WRITERSMEMBERSHIP Currently sponsored by: Syncfusion's 70+ native Blazor controls give apps a superior UI with a fast DataGrid, Charts, Scheduler, and more. Start a free trial now. USING MIDDLEWARE IN .NET 5.0 TO LOG REQUESTS AND RESPONSES The presentation of .NET 5.0 to the wider world has given me the opportunity to dive deeper into some of its features while building an app that will be used in the real world, a rare opportunity I'm loathe to waste. So, my team and I built a new DRAWING WITH FABRICJS AND TYPESCRIPT PART 1: INTRO, GOALSSEE MORE ON EXCEPTIONNOTFOUND.NET QUICKSORT IN C#STABLE? Â NOBEST-CASE: Â O(N LOG N)SEE MORE ON EXCEPTIONNOTFOUND.NET THE REPOSITORY-SERVICE PATTERN WITH DI AND ASP.NET CORESEE MORE ON EXCEPTIONNOTFOUND.NET USING ANTI-FORGERY TOKENS IN ASP.NET 5.0 RAZOR PAGESSEE MORE ON EXCEPTIONNOTFOUND.NET USING A DAPPER BASE REPOSITORY IN C# TO IMPROVE READABILITY Currently sponsored by: Syncfusion's 70+ native Blazor controls give apps a superior UI with a fast DataGrid, Charts, Scheduler, and more. Start a free trial now.ASP.NET MVC
Hello Dear Reader! Want to get the best C#, ASP.NET, web tech, tips, and stories anywhere on the Web? Sign up to receive my premium newsletter The Catch Block! Each Wednesday, you'll get the best reads, job listings, stories, tips, and news from around the ASP.NET and C#worlds.
SETTING THE PAGE TITLE IN A BLAZOR APP This post is gonna be a short one (hence the Tips tag), but it implements something I wish was natively supported in Blazor: setting the page title!. That's right, we're going to see how to take something that used to be a single line of code and make it *counts on fingers* 17 lines of code! FIXING INTELLISENSE AND GO TO DEFINITION IN VISUAL STUDIO 2019 I had a set of very strange problems after upgrading to Visual Studio 2019 early this week, and they were significantly hampering my ability to get work done. Go To Definition didn't work for a great many classes, methods, and properties.Intellisense was straight-up missing in multiple places.I hadn't SOLITAIRE IN BLAZOR PART 1 Yep, you read that right! We're going to code up a new game in Blazor WebAssembly, and I'm proud to announce that it is quite possibly the single biggest time-waster in all computer history: solitaire! I could really, really use a black nine right about now COMMAND PATTERN IN C# Project for this post: Command The Participants. The Command declares an interface for executing an operation.; The ConcreteCommand defines a binding between a Receiver and an action.; The Client creates a ConcreteCommand object and sets its receiver.; The Invoker asks the command to carry out its request.; The Receiver knows how to perform the operations associated with carrying out THE REPOSITORY-SERVICE PATTERN WITH DI AND ASP.NET CORE UPDATE (8 Jun 2021): The sample projects in this post have been upgraded to use .NET 5.0. They will also work with .NET Core. I do a lot of application design and architecture, and a rewrite project I'm heading up needed an architecture sufficiently designed to handle a USING XUNIT THEORY AND INLINEDATA TO TEST C# EXTENSION METHODS UPDATE (8 Jun 2021): This series has been upgraded to .NET 5.0. It previously used ASP.NET Core 3.0. In this final part of my unit testing series, we're going to take a single extension method and show how we can use XUnit's Theory attribute and InlineData attribute to quickly write a bunch of tests for that method. UNIT TESTING ASP.NET 5.0 MVC CONTROLLERS WITH MOQ AND XUNIT UPDATE (8 Jun 2021): This series has been updated to use ASP.NET 5.0. It previously used ASP.NET Core 3.0. Let's continue our unit test extravaganza by writing a set of unit tests for our ASP.NET 5.0 MVCControllers!
MODELING THE CARD GAME WAR IN C# PART 2 NOTE: This is Part 2 of a three-part series demonstrating how we might model the card game War as a C# program. Part 1 is over here.You might want to use the sample project over on GitHub to follow along with this post. Also, check out my other posts in the Modeling Practice series!. Now that we've got our Objects, observations, and other rules in place, it's time to start building them! UNIT TESTING THE BUSINESS LAYER IN ASP.NET 5.0 WITH MOQ Let's write some unit tests! Using Moq and XUnit, let's see how to unit test a sample ASP.NET 5.0 project's business layer. ASPNETCORE_ENVIRONMENT As part of a new ASP.NET Core project that I've been blogging about recently, my team and I have reached the phase where we need to get the project onto some of our development servers, not just running on our local machines.. Problem is, I've been having a hell of a time getting our Azure DevOps system to correctly deploy this site. MAPPING DATATABLES AND DATAROWS TO OBJECTS IN C# AND .NET One Jump Ahead. So here's a basic problem with converting from DataSet, DataTable, and DataRow objects to C# classes: we don't know at compile time what columns and tables exist in the set, so mapping solutions like AutoMapper won't work for this scenario. Our mapping system will have to assume what columns exist. But, in order to make it more reusable, we will make the mapping system HOW TO USE ATTRIBUTE ROUTING IN ASP.NET CORE 3.0 MVC Setup. In order to use attribute routing in ASP.NET Core 3.0, we need to do two things in our Startup.cs file. First, just like with convention-based routing, we need to include the MVC controllers and views in the service layer: EXCEPTION NOT FOUNDABOUTAUTHORSGUEST WRITERSMEMBERSHIP Currently sponsored by: Syncfusion's 70+ native Blazor controls give apps a superior UI with a fast DataGrid, Charts, Scheduler, and more. Start a free trial now. USING MIDDLEWARE IN .NET 5.0 TO LOG REQUESTS AND RESPONSES The presentation of .NET 5.0 to the wider world has given me the opportunity to dive deeper into some of its features while building an app that will be used in the real world, a rare opportunity I'm loathe to waste. So, my team and I built a new DRAWING WITH FABRICJS AND TYPESCRIPT PART 1: INTRO, GOALSSEE MORE ON EXCEPTIONNOTFOUND.NET THE REPOSITORY-SERVICE PATTERN WITH DI AND ASP.NET CORESEE MORE ON EXCEPTIONNOTFOUND.NET QUICKSORT IN C#STABLE? Â NOBEST-CASE: Â O(N LOG N)SEE MORE ON EXCEPTIONNOTFOUND.NET USING A DAPPER BASE REPOSITORY IN C# TO IMPROVE READABILITY Summary. Large-scale, complex projects benefit the most from readability improvments, and when using Dapper and C# the Dapper Base Repository pattern allows for better code readability and a single point of failure by creating a base class with generic methods that allow for querying and execution against a SQL database. SETTING THE PAGE TITLE IN A BLAZOR APP This post is gonna be a short one (hence the Tips tag), but it implements something I wish was natively supported in Blazor: setting the page title!. That's right, we're going to see how to take something that used to be a single line of code and make it *counts on fingers* 17 lines of code! USING ANTI-FORGERY TOKENS IN ASP.NET 5.0 RAZOR PAGESSEE MORE ON EXCEPTIONNOTFOUND.NETASP.NET MVC
Hello Dear Reader! Want to get the best C#, ASP.NET, web tech, tips, and stories anywhere on the Web? Sign up to receive my premium newsletter The Catch Block! Each Wednesday, you'll get the best reads, job listings, stories, tips, and news from around the ASP.NET and C#worlds.
FIXING INTELLISENSE AND GO TO DEFINITION IN VISUAL STUDIO 2019 I had a set of very strange problems after upgrading to Visual Studio 2019 early this week, and they were significantly hampering my ability to get work done. Go To Definition didn't work for a great many classes, methods, and properties.Intellisense was straight-up missing in multiple places.I hadn't EXCEPTION NOT FOUNDABOUTAUTHORSGUEST WRITERSMEMBERSHIP Currently sponsored by: Syncfusion's 70+ native Blazor controls give apps a superior UI with a fast DataGrid, Charts, Scheduler, and more. Start a free trial now. USING MIDDLEWARE IN .NET 5.0 TO LOG REQUESTS AND RESPONSES The presentation of .NET 5.0 to the wider world has given me the opportunity to dive deeper into some of its features while building an app that will be used in the real world, a rare opportunity I'm loathe to waste. So, my team and I built a new DRAWING WITH FABRICJS AND TYPESCRIPT PART 1: INTRO, GOALSSEE MORE ON EXCEPTIONNOTFOUND.NET THE REPOSITORY-SERVICE PATTERN WITH DI AND ASP.NET CORESEE MORE ON EXCEPTIONNOTFOUND.NET QUICKSORT IN C#STABLE? Â NOBEST-CASE: Â O(N LOG N)SEE MORE ON EXCEPTIONNOTFOUND.NET USING A DAPPER BASE REPOSITORY IN C# TO IMPROVE READABILITY Summary. Large-scale, complex projects benefit the most from readability improvments, and when using Dapper and C# the Dapper Base Repository pattern allows for better code readability and a single point of failure by creating a base class with generic methods that allow for querying and execution against a SQL database. SETTING THE PAGE TITLE IN A BLAZOR APP This post is gonna be a short one (hence the Tips tag), but it implements something I wish was natively supported in Blazor: setting the page title!. That's right, we're going to see how to take something that used to be a single line of code and make it *counts on fingers* 17 lines of code! USING ANTI-FORGERY TOKENS IN ASP.NET 5.0 RAZOR PAGESSEE MORE ON EXCEPTIONNOTFOUND.NETASP.NET MVC
Hello Dear Reader! Want to get the best C#, ASP.NET, web tech, tips, and stories anywhere on the Web? Sign up to receive my premium newsletter The Catch Block! Each Wednesday, you'll get the best reads, job listings, stories, tips, and news from around the ASP.NET and C#worlds.
FIXING INTELLISENSE AND GO TO DEFINITION IN VISUAL STUDIO 2019 I had a set of very strange problems after upgrading to Visual Studio 2019 early this week, and they were significantly hampering my ability to get work done. Go To Definition didn't work for a great many classes, methods, and properties.Intellisense was straight-up missing in multiple places.I hadn't THE REPOSITORY-SERVICE PATTERN WITH DI AND ASP.NET CORE The Repository-Service pattern breaks up the business layer of the app into two distinct layers. The lower layer is the Repositories. These classes handle getting data into and out of our data store, with the important caveat that each Repository only works against a single Model class. So, if your models are Dogs, Cats, and Rats, you would UNIT TESTING ASP.NET 5.0 MVC CONTROLLERS WITH MOQ AND XUNIT UPDATE (8 Jun 2021): This series has been updated to use ASP.NET 5.0. It previously used ASP.NET Core 3.0. Let's continue our unit test extravaganza by writing a set of unit tests for our ASP.NET 5.0 MVCControllers!
USING XUNIT THEORY AND INLINEDATA TO TEST C# EXTENSION METHODS Using XUnit Theory and InlineData to Test C# Extension Methods. In this final part of my unit testing series, we're going to take a single extension method and show how we can use XUnit's Theory attribute and InlineData attribute to quickly write a bunch of tests for that method. Oh don't worry, our test won't even be this hard. PATTERN OVERVIEW: CQRS AND EVENT SOURCING Pattern Overview: Command-Query Responsibility Segregation and Event Sourcing. A major project we're working on will be using the Command-Query Responsibility Segregation (CQRS) and Event Sourcing (ES) patterns for its application architecture, and I've spent a few weeks getting my head wrapped around these two ideas. MAPPING DATATABLES AND DATAROWS TO OBJECTS IN C# AND .NET One Jump Ahead. So here's a basic problem with converting from DataSet, DataTable, and DataRow objects to C# classes: we don't know at compile time what columns and tables exist in the set, so mapping solutions like AutoMapper won't work for this scenario. Our mapping system will have to assume what columns exist. But, in order to make it more reusable, we will make the mapping system IMPLEMENTING POST-REDIRECT-GET IN ASP.NET CORE RAZOR PAGES I've written before about implementing a pattern known as POST-REDIRECT-GET in my ASP.NET MVC apps, and since my team and I are working on a new ASP.NET Core Razor Pages project I thought it might be useful to see if such a pattern can be implemented there.. Don't stare; you might see things you wish you hadn't. Like F#. Photo by Paweł Czerwiński / Unsplash USING ANTI-FORGERY TOKENS IN ASP.NET 5.0 RAZOR PAGES The purpose of using anti-forgery tokens is to prevent cross-site request forgery (CSRF) attacks. It does this by submitting two different values to the server on any given POST, both of which must exist in order for the server to allow the request. One of those values is submitted as a cookie, and the other as form data.DAPPER VS. EF CORE
Thus, it's really a very thin layer between your application and the database you are using. EF Core, on the other hand, is a full-fledged ORM with lots of cool features, including change tracking. These features make this library a bit more cumbersome, and possibly a lot less performant than Dapper. ADDING SWAGGER TO ASP.NET CORE WEB API USING XML DOCUMENTATION The Package. First, we need to grab the NuGet package for the project known as Swashbuckle.AspNetCore. This package adds Swagger, SwaggerUI, and other libraries to make it easy for us to create our API documentation. With the package installed, we now need to enable our project to generate XML comments. The comments come from triple-slash ASPNETCORE_ENVIRONMENT As part of a new ASP.NET Core project that I've been blogging about recently, my team and I have reached the phase where we need to get the project onto some of our development servers, not just running on our local machines.. Problem is, I've been having a hell of a time getting our Azure DevOps system to correctly deploy this site. EXCEPTION NOT FOUNDABOUTAUTHORSGUEST WRITERSMEMBERSHIP Currently sponsored by: Syncfusion's 70+ native Blazor controls give apps a superior UI with a fast DataGrid, Charts, Scheduler, and more. Start a free trial now. HTTP STATUS CODES IN ASP.NET WEB API HTTP implements a wide variety of status codes, which are grouped into five categories. The five categories are distinguished by the code's first number, like so: 1XX Codes: Informational codes. Rarely used in modern web apps. 2XX Codes: Success codes. Tells the client that therequest succeeded.
THE REPOSITORY-SERVICE PATTERN WITH DI AND ASP.NET CORESEE MORE ON EXCEPTIONNOTFOUND.NET QUICKSORT IN C#STABLE? Â NOBEST-CASE: Â O(N LOG N)SEE MORE ON EXCEPTIONNOTFOUND.NET RENDERING A BOOTSTRAP POPOVER USING ASP.NET CORE RAZOR Summary. We can use jQuery AJAX calls to render a dedicated Razor Page as the content of a Bootstrap popover in our ASP.NET Core apps. Remember the following: We need to create a dedicated Razor Page that will only display the contents of the popover. This dedicated page needs to have Layout set to null. The AJAX call needs to set the URL,and
MODELSTATE IN ASP.NET 5.0 MVC ModelState is a property of a Controller instance, and can be accessed from any class that inherits from Microsoft.AspNetCore.Mvc.Controller. The ModelState has two purposes: to store and submit POSTed name-value pairs, and to store the validation errors associated with each value. All right, enough of the boring explanation. USING XUNIT THEORY AND INLINEDATA TO TEST C# EXTENSION METHODS Using XUnit Theory and InlineData to Test C# Extension Methods. In this final part of my unit testing series, we're going to take a single extension method and show how we can use XUnit's Theory attribute and InlineData attribute to quickly write a bunch of tests for that method. Oh don't worry, our test won't even be this hard. HOW TO USE ROUTING IN ASP.NET CORE 3.0 RAZOR PAGESSEE MORE ON EXCEPTIONNOTFOUND.NET USING MIDDLEWARE IN .NET 5.0 TO LOG REQUESTS AND RESPONSES The presentation of .NET 5.0 to the wider world has given me the opportunity to dive deeper into some of its features while building an app that will be used in the real world, a rare opportunity I'm loathe to waste. So, my team and I built a new IMPLEMENTING POST-REDIRECT-GET IN ASP.NET CORE RAZOR PAGES We can remove the annoying "Confirm Form Resubmission" popups and make our user experience just that much better by using the POST-REDIRECT-GET (PRG) pattern in ASP.NET Core and Razor Pages. Remember the following in order to implement PRG: Make the parameters to the search inputs to the OnGet () function. EXCEPTION NOT FOUNDABOUTAUTHORSGUEST WRITERSMEMBERSHIP Currently sponsored by: Syncfusion's 70+ native Blazor controls give apps a superior UI with a fast DataGrid, Charts, Scheduler, and more. Start a free trial now. HTTP STATUS CODES IN ASP.NET WEB API HTTP implements a wide variety of status codes, which are grouped into five categories. The five categories are distinguished by the code's first number, like so: 1XX Codes: Informational codes. Rarely used in modern web apps. 2XX Codes: Success codes. Tells the client that therequest succeeded.
THE REPOSITORY-SERVICE PATTERN WITH DI AND ASP.NET CORESEE MORE ON EXCEPTIONNOTFOUND.NET QUICKSORT IN C#STABLE? Â NOBEST-CASE: Â O(N LOG N)SEE MORE ON EXCEPTIONNOTFOUND.NET RENDERING A BOOTSTRAP POPOVER USING ASP.NET CORE RAZOR Summary. We can use jQuery AJAX calls to render a dedicated Razor Page as the content of a Bootstrap popover in our ASP.NET Core apps. Remember the following: We need to create a dedicated Razor Page that will only display the contents of the popover. This dedicated page needs to have Layout set to null. The AJAX call needs to set the URL,and
MODELSTATE IN ASP.NET 5.0 MVC ModelState is a property of a Controller instance, and can be accessed from any class that inherits from Microsoft.AspNetCore.Mvc.Controller. The ModelState has two purposes: to store and submit POSTed name-value pairs, and to store the validation errors associated with each value. All right, enough of the boring explanation. USING XUNIT THEORY AND INLINEDATA TO TEST C# EXTENSION METHODS Using XUnit Theory and InlineData to Test C# Extension Methods. In this final part of my unit testing series, we're going to take a single extension method and show how we can use XUnit's Theory attribute and InlineData attribute to quickly write a bunch of tests for that method. Oh don't worry, our test won't even be this hard. HOW TO USE ROUTING IN ASP.NET CORE 3.0 RAZOR PAGESSEE MORE ON EXCEPTIONNOTFOUND.NET USING MIDDLEWARE IN .NET 5.0 TO LOG REQUESTS AND RESPONSES The presentation of .NET 5.0 to the wider world has given me the opportunity to dive deeper into some of its features while building an app that will be used in the real world, a rare opportunity I'm loathe to waste. So, my team and I built a new IMPLEMENTING POST-REDIRECT-GET IN ASP.NET CORE RAZOR PAGES We can remove the annoying "Confirm Form Resubmission" popups and make our user experience just that much better by using the POST-REDIRECT-GET (PRG) pattern in ASP.NET Core and Razor Pages. Remember the following in order to implement PRG: Make the parameters to the search inputs to the OnGet () function.C# IN SIMPLE TERMS
Since we now know a bit about C# classes, we can learn how to write code that handles unexpected situations and errors.This process is called exception handling, and is a part of all but the most basic C# programs.. Let's learn about exceptions and how C# allows us to handle them! Better watch out, it's catching. Photo by Luis Quintero / Unsplash The Sample Solution SOLITAIRE IN BLAZOR PART 1 Yep, you read that right! We're going to code up a new game in Blazor WebAssembly, and I'm proud to announce that it is quite possibly the single biggest time-waster in all computer history: solitaire! I could really, really use a black nine right about now THE REPOSITORY-SERVICE PATTERN WITH DI AND ASP.NET CORE The Repository-Service pattern breaks up the business layer of the app into two distinct layers. The lower layer is the Repositories. These classes handle getting data into and out of our data store, with the important caveat that each Repository only works against a single Model class. So, if your models are Dogs, Cats, and Rats, you wouldTHE CATCH BLOCK #60
The hell weeks continue. But at least we learned something. 2.5 things, in fact. Also in this issue: Pwned Passwords, TypeScript 4.3, technical debt, ConnectFour, hot UNIT TESTING ASP.NET CORE MVC CONTROLLERS WITH MOQ AND XUNIT Currently sponsored by: Syncfusion's 70+ native Blazor controls give apps a superior UI with a fast DataGrid, Charts, Scheduler, and more. Start a free trial now.QUICKSORT IN C#
Project for this post: QuickSort Algorithm. SELECT a pivot point. (Our implementation selects the last number in the collection). REORDER the collection such that all values less than the pivot are before the pivot, and all values greater than the pivot are after it. HOW TO USE ROUTING IN ASP.NET CORE 3.0 RAZOR PAGES The "**" syntax is a special case termed a catch-all; it means that literally anything in this segment is part of the "title" value, including an empty string.. Using To Map Route Templates. Razor Pages includes a unique feature for its routing system: the attribute .This attribute allows the routing system to map values from an incoming URL to properties on a SETTING THE PAGE TITLE IN A BLAZOR APP This post is gonna be a short one (hence the Tips tag), but it implements something I wish was natively supported in Blazor: setting the page title!. That's right, we're going to see how to take something that used to be a single line of code and make it *counts on fingers* 17 lines of code! USING ANTI-FORGERY TOKENS IN ASP.NET CORE RAZOR PAGES The purpose of using anti-forgery tokens is to prevent cross-site request forgery (CSRF) attacks. It does this by submitting two different values to the server on any given POST, both of which must exist in order for the server to allow the request. One of those values is submitted as a cookie, and the other as form data. HOW TO USE ATTRIBUTE ROUTING IN ASP.NET CORE 3.0 MVC Setup. In order to use attribute routing in ASP.NET Core 3.0, we need to do two things in our Startup.cs file. First, just like with convention-based routing, we need to include the MVC controllers and views in the service layer: Next, we need to call the new MapControllers () method inside of the UseEndpoints () method: TheMapControllers
EXCEPTION NOT FOUNDABOUTAUTHORSGUEST WRITERSMEMBERSHIP Currently sponsored by: Syncfusion's 70+ native Blazor controls give apps a superior UI with a fast DataGrid, Charts, Scheduler, and more. Start a free trial now. USING MIDDLEWARE IN .NET 5.0 TO LOG REQUESTS AND RESPONSES The presentation of .NET 5.0 to the wider world has given me the opportunity to dive deeper into some of its features while building an app that will be used in the real world, a rare opportunity I'm loathe to waste. So, my team and I built a new THE REPOSITORY-SERVICE PATTERN WITH DI AND ASP.NET CORESEE MORE ON EXCEPTIONNOTFOUND.NET DRAWING WITH FABRICJS AND TYPESCRIPT PART 1: INTRO, GOALSSEE MORE ON EXCEPTIONNOTFOUND.NET QUICKSORT IN C#STABLE? Â NOBEST-CASE: Â O(N LOG N)SEE MORE ON EXCEPTIONNOTFOUND.NET USING A DAPPER BASE REPOSITORY IN C# TO IMPROVE READABILITY Currently sponsored by: Syncfusion's 70+ native Blazor controls give apps a superior UI with a fast DataGrid, Charts, Scheduler, and more. Start a free trial now. RENDERING A BOOTSTRAP POPOVER USING ASP.NET CORE RAZOR Currently sponsored by: Syncfusion's 70+ native Blazor controls give apps a superior UI with a fast DataGrid, Charts, Scheduler, and more. Start a free trial now. SETTING THE PAGE TITLE IN A BLAZOR APP This post is gonna be a short one (hence the Tips tag), but it implements something I wish was natively supported in Blazor: setting the page title!. That's right, we're going to see how to take something that used to be a single line of code and make it *counts on fingers* 17 lines of code!ASP.NET MVC
Hello Dear Reader! Want to get the best C#, ASP.NET, web tech, tips, and stories anywhere on the Web? Sign up to receive my premium newsletter The Catch Block! Each Wednesday, you'll get the best reads, job listings, stories, tips, and news from around the ASP.NET and C#worlds.
FIXING INTELLISENSE AND GO TO DEFINITION IN VISUAL STUDIO 2019 I had a set of very strange problems after upgrading to Visual Studio 2019 early this week, and they were significantly hampering my ability to get work done. Go To Definition didn't work for a great many classes, methods, and properties.Intellisense was straight-up missing in multiple places.I hadn't EXCEPTION NOT FOUNDABOUTAUTHORSGUEST WRITERSMEMBERSHIP Currently sponsored by: Syncfusion's 70+ native Blazor controls give apps a superior UI with a fast DataGrid, Charts, Scheduler, and more. Start a free trial now. USING MIDDLEWARE IN .NET 5.0 TO LOG REQUESTS AND RESPONSES The presentation of .NET 5.0 to the wider world has given me the opportunity to dive deeper into some of its features while building an app that will be used in the real world, a rare opportunity I'm loathe to waste. So, my team and I built a new THE REPOSITORY-SERVICE PATTERN WITH DI AND ASP.NET CORESEE MORE ON EXCEPTIONNOTFOUND.NET DRAWING WITH FABRICJS AND TYPESCRIPT PART 1: INTRO, GOALSSEE MORE ON EXCEPTIONNOTFOUND.NET QUICKSORT IN C#STABLE? Â NOBEST-CASE: Â O(N LOG N)SEE MORE ON EXCEPTIONNOTFOUND.NET USING A DAPPER BASE REPOSITORY IN C# TO IMPROVE READABILITY Currently sponsored by: Syncfusion's 70+ native Blazor controls give apps a superior UI with a fast DataGrid, Charts, Scheduler, and more. Start a free trial now. RENDERING A BOOTSTRAP POPOVER USING ASP.NET CORE RAZOR Currently sponsored by: Syncfusion's 70+ native Blazor controls give apps a superior UI with a fast DataGrid, Charts, Scheduler, and more. Start a free trial now. SETTING THE PAGE TITLE IN A BLAZOR APP This post is gonna be a short one (hence the Tips tag), but it implements something I wish was natively supported in Blazor: setting the page title!. That's right, we're going to see how to take something that used to be a single line of code and make it *counts on fingers* 17 lines of code!ASP.NET MVC
Hello Dear Reader! Want to get the best C#, ASP.NET, web tech, tips, and stories anywhere on the Web? Sign up to receive my premium newsletter The Catch Block! Each Wednesday, you'll get the best reads, job listings, stories, tips, and news from around the ASP.NET and C#worlds.
FIXING INTELLISENSE AND GO TO DEFINITION IN VISUAL STUDIO 2019 I had a set of very strange problems after upgrading to Visual Studio 2019 early this week, and they were significantly hampering my ability to get work done. Go To Definition didn't work for a great many classes, methods, and properties.Intellisense was straight-up missing in multiple places.I hadn't THE REPOSITORY-SERVICE PATTERN WITH DI AND ASP.NET CORE UPDATE (8 Jun 2021): The sample projects in this post have been upgraded to use .NET 5.0. They will also work with .NET Core. I do a lot of application design and architecture, and a rewrite project I'm heading up needed an architecture sufficiently designed to handle aTHE CATCH BLOCK #61
1 day ago · Two fantastic online resources headline this issue. Plus: C# 10 features, preventing duplicate web requests in ASP.NET Core, the new DateOnly and TimeOnly classes in .NET 6, and the diverse and fantastical shape of testing.. Spotlight On: Oh Shit, Git! SOLITAIRE IN BLAZOR PART 1 Yep, you read that right! We're going to code up a new game in Blazor WebAssembly, and I'm proud to announce that it is quite possibly the single biggest time-waster in all computer history: solitaire! I could really, really use a black nine right about now USING ANTI-FORGERY TOKENS IN ASP.NET 5.0 RAZOR PAGES UPDATE (8 Jun 2021): The sample project used in this post has been upgraded to .NET 5.0. My team's exploration of ASP.NET 5.0 and Razor Pages continues, and now we come to something that I was very used to doing in ASP.NET MVC, but hadn't done at all in .NET 5: using anti-forgery tokens and validation.. How many of these does it take toplay Skee-ball?
MAPPING DATATABLES AND DATAROWS TO OBJECTS IN C# AND .NET One Jump Ahead. So here's a basic problem with converting from DataSet, DataTable, and DataRow objects to C# classes: we don't know at compile time what columns and tables exist in the set, so mapping solutions like AutoMapper won't work for this scenario. Our mapping system will have to assume what columns exist. But, in order to make it more reusable, we will make the mapping system USING XUNIT THEORY AND INLINEDATA TO TEST C# EXTENSION METHODS Summary. Test methods marked with the attribute can have input parameters, and have values passed to them by using the attribute. In this way, a single test method can support many tests, and developers save significant time writing tests by using these attributes.ASP.NET MVC
Hello Dear Reader! Want to get the best C#, ASP.NET, web tech, tips, and stories anywhere on the Web? Sign up to receive my premium newsletter The Catch Block! Each Wednesday, you'll get the best reads, job listings, stories, tips, and news from around the ASP.NET and C#worlds.
DAPPER VS. EF CORE
Conclusions. Let's start with the obvious conclusion: Dapper is way faster than EF Core whether or not AsNoTracking() is used.That much is just as true as it was four years ago. But there's also a less obvious conclusion, one that I saw every time I ran the test harness: the Roster by Team ID query takes less time than the "simpler" Player by ID query in both variants of EF Core tests. ADDING SWAGGER TO ASP.NET CORE WEB API USING XML … On to the tutorial! It has been previously established on this blog that I, like many developers, absolutely deplore writing documentation. It's slow, it's boring, anything I write is probably gonna be obsolete in like five minutes, I hate doing it. ASPNETCORE_ENVIRONMENT Within the span of an hour, it had all gone to hell. The first deployment went rather smoothly. It was a fix to an existing webservice, and went out with no problems, or so we thought. EXCEPTION NOT FOUNDABOUTAUTHORSGUEST WRITERSMEMBERSHIP Currently sponsored by: Syncfusion's 70+ native Blazor controls give apps a superior UI with a fast DataGrid, Charts, Scheduler, and more. Start a free trial now. HTTP STATUS CODES IN ASP.NET WEB API HTTP implements a wide variety of status codes, which are grouped into five categories. The five categories are distinguished by the code's first number, like so: 1XX Codes: Informational codes. Rarely used in modern web apps. 2XX Codes: Success codes. Tells the client that therequest succeeded.
DRAWING WITH FABRICJS AND TYPESCRIPT PART 1: INTRO, GOALSSEE MORE ON EXCEPTIONNOTFOUND.NET THE REPOSITORY-SERVICE PATTERN WITH DI AND ASP.NET CORESEE MORE ON EXCEPTIONNOTFOUND.NET MODELSTATE IN ASP.NET 5.0 MVC ModelState is a property of a Controller instance, and can be accessed from any class that inherits from Microsoft.AspNetCore.Mvc.Controller. The ModelState has two purposes: to store and submit POSTed name-value pairs, and to store the validation errors associated with each value. All right, enough of the boring explanation. USING XUNIT THEORY AND INLINEDATA TO TEST C# EXTENSION METHODS Using XUnit Theory and InlineData to Test C# Extension Methods. In this final part of my unit testing series, we're going to take a single extension method and show how we can use XUnit's Theory attribute and InlineData attribute to quickly write a bunch of tests for that method. Oh don't worry, our test won't even be this hard. SERIALIZING ENUMS IN ASP.NET WEB APISEE MORE ON EXCEPTIONNOTFOUND.NET USING MIDDLEWARE IN .NET 5.0 TO LOG REQUESTS AND RESPONSES The presentation of .NET 5.0 to the wider world has given me the opportunity to dive deeper into some of its features while building an app that will be used in the real world, a rare opportunity I'm loathe to waste. So, my team and I built a new IMPLEMENTING POST-REDIRECT-GET IN ASP.NET CORE RAZOR PAGES We can remove the annoying "Confirm Form Resubmission" popups and make our user experience just that much better by using the POST-REDIRECT-GET (PRG) pattern in ASP.NET Core and Razor Pages. Remember the following in order to implement PRG: Make the parameters to the search inputs to the OnGet () function. EXPLORING BLAZOR BY MAKING AN HTML TABLE SORTABLE IN .NET CORESEE MORE ON EXCEPTIONNOTFOUND.NET EXCEPTION NOT FOUNDABOUTAUTHORSGUEST WRITERSMEMBERSHIP Currently sponsored by: Syncfusion's 70+ native Blazor controls give apps a superior UI with a fast DataGrid, Charts, Scheduler, and more. Start a free trial now. HTTP STATUS CODES IN ASP.NET WEB API HTTP implements a wide variety of status codes, which are grouped into five categories. The five categories are distinguished by the code's first number, like so: 1XX Codes: Informational codes. Rarely used in modern web apps. 2XX Codes: Success codes. Tells the client that therequest succeeded.
DRAWING WITH FABRICJS AND TYPESCRIPT PART 1: INTRO, GOALSSEE MORE ON EXCEPTIONNOTFOUND.NET THE REPOSITORY-SERVICE PATTERN WITH DI AND ASP.NET CORESEE MORE ON EXCEPTIONNOTFOUND.NET MODELSTATE IN ASP.NET 5.0 MVC ModelState is a property of a Controller instance, and can be accessed from any class that inherits from Microsoft.AspNetCore.Mvc.Controller. The ModelState has two purposes: to store and submit POSTed name-value pairs, and to store the validation errors associated with each value. All right, enough of the boring explanation. USING XUNIT THEORY AND INLINEDATA TO TEST C# EXTENSION METHODS Using XUnit Theory and InlineData to Test C# Extension Methods. In this final part of my unit testing series, we're going to take a single extension method and show how we can use XUnit's Theory attribute and InlineData attribute to quickly write a bunch of tests for that method. Oh don't worry, our test won't even be this hard. SERIALIZING ENUMS IN ASP.NET WEB APISEE MORE ON EXCEPTIONNOTFOUND.NET USING MIDDLEWARE IN .NET 5.0 TO LOG REQUESTS AND RESPONSES The presentation of .NET 5.0 to the wider world has given me the opportunity to dive deeper into some of its features while building an app that will be used in the real world, a rare opportunity I'm loathe to waste. So, my team and I built a new IMPLEMENTING POST-REDIRECT-GET IN ASP.NET CORE RAZOR PAGES We can remove the annoying "Confirm Form Resubmission" popups and make our user experience just that much better by using the POST-REDIRECT-GET (PRG) pattern in ASP.NET Core and Razor Pages. Remember the following in order to implement PRG: Make the parameters to the search inputs to the OnGet () function. EXPLORING BLAZOR BY MAKING AN HTML TABLE SORTABLE IN .NET CORESEE MORE ON EXCEPTIONNOTFOUND.NETC# IN SIMPLE TERMS
Since we now know a bit about C# classes, we can learn how to write code that handles unexpected situations and errors.This process is called exception handling, and is a part of all but the most basic C# programs.. Let's learn about exceptions and how C# allows us to handle them! Better watch out, it's catching. Photo by Luis Quintero / Unsplash The Sample Solution SOLITAIRE IN BLAZOR PART 1 Yep, you read that right! We're going to code up a new game in Blazor WebAssembly, and I'm proud to announce that it is quite possibly the single biggest time-waster in all computer history: solitaire! I could really, really use a black nine right about now THE REPOSITORY-SERVICE PATTERN WITH DI AND ASP.NET CORE The Repository-Service pattern breaks up the business layer of the app into two distinct layers. The lower layer is the Repositories. These classes handle getting data into and out of our data store, with the important caveat that each Repository only works against a single Model class. So, if your models are Dogs, Cats, and Rats, you wouldTHE CATCH BLOCK #60
The hell weeks continue. But at least we learned something. 2.5 things, in fact. Also in this issue: Pwned Passwords, TypeScript 4.3, technical debt, ConnectFour, hot UNIT TESTING ASP.NET CORE MVC CONTROLLERS WITH MOQ AND XUNIT Currently sponsored by: Syncfusion's 70+ native Blazor controls give apps a superior UI with a fast DataGrid, Charts, Scheduler, and more. Start a free trial now.QUICKSORT IN C#
Project for this post: QuickSort Algorithm. SELECT a pivot point. (Our implementation selects the last number in the collection). REORDER the collection such that all values less than the pivot are before the pivot, and all values greater than the pivot are after it. HOW TO USE ROUTING IN ASP.NET CORE 3.0 RAZOR PAGES The "**" syntax is a special case termed a catch-all; it means that literally anything in this segment is part of the "title" value, including an empty string.. Using To Map Route Templates. Razor Pages includes a unique feature for its routing system: the attribute .This attribute allows the routing system to map values from an incoming URL to properties on a SETTING THE PAGE TITLE IN A BLAZOR APP This post is gonna be a short one (hence the Tips tag), but it implements something I wish was natively supported in Blazor: setting the page title!. That's right, we're going to see how to take something that used to be a single line of code and make it *counts on fingers* 17 lines of code! USING ANTI-FORGERY TOKENS IN ASP.NET CORE RAZOR PAGES The purpose of using anti-forgery tokens is to prevent cross-site request forgery (CSRF) attacks. It does this by submitting two different values to the server on any given POST, both of which must exist in order for the server to allow the request. One of those values is submitted as a cookie, and the other as form data. HOW TO USE ATTRIBUTE ROUTING IN ASP.NET CORE 3.0 MVC Setup. In order to use attribute routing in ASP.NET Core 3.0, we need to do two things in our Startup.cs file. First, just like with convention-based routing, we need to include the MVC controllers and views in the service layer: Next, we need to call the new MapControllers () method inside of the UseEndpoints () method: TheMapControllers
EXCEPTION NOT FOUNDABOUTAUTHORSGUEST WRITERSMEMBERSHIP Currently sponsored by: Syncfusion's 70+ native Blazor controls give apps a superior UI with a fast DataGrid, Charts, Scheduler, and more. Start a free trial now. USING MIDDLEWARE IN .NET 5.0 TO LOG REQUESTS AND RESPONSES The presentation of .NET 5.0 to the wider world has given me the opportunity to dive deeper into some of its features while building an app that will be used in the real world, a rare opportunity I'm loathe to waste. So, my team and I built a new DRAWING WITH FABRICJS AND TYPESCRIPT PART 1: INTRO, GOALSSEE MORE ON EXCEPTIONNOTFOUND.NET THE REPOSITORY-SERVICE PATTERN WITH DI AND ASP.NET CORESEE MORE ON EXCEPTIONNOTFOUND.NET UNIT TESTING ASP.NET CORE MVC CONTROLLERS WITH MOQ AND XUNIT Currently sponsored by: Syncfusion's 70+ native Blazor controls give apps a superior UI with a fast DataGrid, Charts, Scheduler, and more. Start a free trial now.ASP.NET MVC
Hello Dear Reader! Want to get the best C#, ASP.NET, web tech, tips, and stories anywhere on the Web? Sign up to receive my premium newsletter The Catch Block! Each Wednesday, you'll get the best reads, job listings, stories, tips, and news from around the ASP.NET and C#worlds.
USING ANTI-FORGERY TOKENS IN ASP.NET CORE RAZOR PAGESSEE MORE ON EXCEPTIONNOTFOUND.NET USING A DAPPER BASE REPOSITORY IN C# TO IMPROVE READABILITY Currently sponsored by: Syncfusion's 70+ native Blazor controls give apps a superior UI with a fast DataGrid, Charts, Scheduler, and more. Start a free trial now.DAPPER VS. EF CORE
QUICKSORT IN C#STABLE? Â NOBEST-CASE: Â O(N LOG N)SEE MORE ON EXCEPTIONNOTFOUND.NET EXCEPTION NOT FOUNDABOUTAUTHORSGUEST WRITERSMEMBERSHIP Currently sponsored by: Syncfusion's 70+ native Blazor controls give apps a superior UI with a fast DataGrid, Charts, Scheduler, and more. Start a free trial now. USING MIDDLEWARE IN .NET 5.0 TO LOG REQUESTS AND RESPONSES The presentation of .NET 5.0 to the wider world has given me the opportunity to dive deeper into some of its features while building an app that will be used in the real world, a rare opportunity I'm loathe to waste. So, my team and I built a new DRAWING WITH FABRICJS AND TYPESCRIPT PART 1: INTRO, GOALSSEE MORE ON EXCEPTIONNOTFOUND.NET THE REPOSITORY-SERVICE PATTERN WITH DI AND ASP.NET CORESEE MORE ON EXCEPTIONNOTFOUND.NET UNIT TESTING ASP.NET CORE MVC CONTROLLERS WITH MOQ AND XUNIT Currently sponsored by: Syncfusion's 70+ native Blazor controls give apps a superior UI with a fast DataGrid, Charts, Scheduler, and more. Start a free trial now.ASP.NET MVC
Hello Dear Reader! Want to get the best C#, ASP.NET, web tech, tips, and stories anywhere on the Web? Sign up to receive my premium newsletter The Catch Block! Each Wednesday, you'll get the best reads, job listings, stories, tips, and news from around the ASP.NET and C#worlds.
USING ANTI-FORGERY TOKENS IN ASP.NET CORE RAZOR PAGESSEE MORE ON EXCEPTIONNOTFOUND.NET USING A DAPPER BASE REPOSITORY IN C# TO IMPROVE READABILITY Currently sponsored by: Syncfusion's 70+ native Blazor controls give apps a superior UI with a fast DataGrid, Charts, Scheduler, and more. Start a free trial now.DAPPER VS. EF CORE
QUICKSORT IN C#STABLE? Â NOBEST-CASE: Â O(N LOG N)SEE MORE ON EXCEPTIONNOTFOUND.NET SOLITAIRE IN BLAZOR PART 1 Yep, you read that right! We're going to code up a new game in Blazor WebAssembly, and I'm proud to announce that it is quite possibly the single biggest time-waster in all computer history: solitaire! I could really, really use a black nine right about nowC# IN SIMPLE TERMS
Since we now know a bit about C# classes, we can learn how to write code that handles unexpected situations and errors.This process is called exception handling, and is a part of all but the most basic C# programs.. Let's learn about exceptions and how C# allows us to handle them! Better watch out, it's catching. Photo by Luis Quintero / Unsplash The Sample SolutionTHE CATCH BLOCK #60
The hell weeks continue. But at least we learned something. 2.5 things, in fact. Also in this issue: Pwned Passwords, TypeScript 4.3, technical debt, ConnectFour, hot THE REPOSITORY-SERVICE PATTERN WITH DI AND ASP.NET CORE Currently sponsored by: Syncfusion's 70+ native Blazor controls give apps a superior UI with a fast DataGrid, Charts, Scheduler, and more. Start a free trial now. MODELING THE CARD GAME WAR IN C# PART 2 NOTE: This is Part 2 of a three-part series demonstrating how we might model the card game War as a C# program. Part 1 is over here.You might want to use the sample project over on GitHub to follow along with this post. Also, check out my other posts in the Modeling Practice series!. Now that we've got our Objects, observations, and other rules in place, it's time to start building them! USING XUNIT THEORY AND INLINEDATA TO TEST C# EXTENSION METHODS Summary. Test methods marked with the attribute can have input parameters, and have values passed to them by using the attribute. In this way, a single test method can support many tests, and developers save significant time writing tests by using these attributes. USING ANTI-FORGERY TOKENS IN ASP.NET CORE RAZOR PAGES What Are Anti-Forgery Tokens? The purpose of using anti-forgery tokens is to prevent cross-site request forgery (CSRF) attacks.It does this by submitting two different values to the server on any given POST, both of which must exist in order for the server to allow the request. UNIT TESTING ASP.NET CORE MVC CONTROLLERS WITH MOQ AND XUNIT Currently sponsored by: Syncfusion's 70+ native Blazor controls give apps a superior UI with a fast DataGrid, Charts, Scheduler, and more. Start a free trial now. MAPPING DATATABLES AND DATAROWS TO OBJECTS IN C# AND .NET One Jump Ahead. So here's a basic problem with converting from DataSet, DataTable, and DataRow objects to C# classes: we don't know at compile time what columns and tables exist in the set, so mapping solutions like AutoMapper won't work for this scenario. Our mapping system will have to assume what columns exist. But, in order to make it more reusable, we will make the mapping system IMPLEMENTING POST-REDIRECT-GET IN ASP.NET CORE RAZOR PAGES I've written before about implementing a pattern known as POST-REDIRECT-GET in my ASP.NET MVC apps, and since my team and I are working on a new ASP.NET Core Razor Pages project I thought it might be useful to see if such a pattern can be implemented there.. Don't stare; you might see things you wish you hadn't. Like F#. Photo by Paweł Czerwiński / Unsplash EXCEPTION NOT FOUNDABOUTAUTHORSGUEST WRITERSMEMBERSHIP Currently sponsored by: Syncfusion's 70+ native Blazor controls give apps a superior UI with a fast DataGrid, Charts, Scheduler, and more. Start a free trial now. DRAWING WITH FABRICJS AND TYPESCRIPT PART 1: INTRO, GOALSSEE MORE ON EXCEPTIONNOTFOUND.NETASP.NET MVC
Hello Dear Reader! Want to get the best C#, ASP.NET, web tech, tips, and stories anywhere on the Web? Sign up to receive my premium newsletter The Catch Block! Each Wednesday, you'll get the best reads, job listings, stories, tips, and news from around the ASP.NET and C#worlds.
THE REPOSITORY-SERVICE PATTERN WITH DI AND ASP.NET CORESEE MORE ON EXCEPTIONNOTFOUND.NET UNIT TESTING ASP.NET CORE MVC CONTROLLERS WITH MOQ AND XUNIT Currently sponsored by: Syncfusion's 70+ native Blazor controls give apps a superior UI with a fast DataGrid, Charts, Scheduler, and more. Start a free trial now. USING A DAPPER BASE REPOSITORY IN C# TO IMPROVE READABILITY Summary. Large-scale, complex projects benefit the most from readability improvments, and when using Dapper and C# the Dapper Base Repository pattern allows for better code readability and a single point of failure by creating a base class with generic methods that allow for querying and execution against a SQL database. QUICKSORT IN C#STABLE? Â NOBEST-CASE: Â O(N LOG N)SEE MORE ON EXCEPTIONNOTFOUND.NET USING MIDDLEWARE IN .NET 5.0 TO LOG REQUESTS AND RESPONSES The presentation of .NET 5.0 to the wider world has given me the opportunity to dive deeper into some of its features while building an app that will be used in the real world, a rare opportunity I'm loathe to waste. So, my team and I built a new USING ANTI-FORGERY TOKENS IN ASP.NET CORE RAZOR PAGESSEE MORE ON EXCEPTIONNOTFOUND.NETDAPPER VS. EF CORE
EXCEPTION NOT FOUNDABOUTAUTHORSGUEST WRITERSMEMBERSHIP Currently sponsored by: Syncfusion's 70+ native Blazor controls give apps a superior UI with a fast DataGrid, Charts, Scheduler, and more. Start a free trial now. DRAWING WITH FABRICJS AND TYPESCRIPT PART 1: INTRO, GOALSSEE MORE ON EXCEPTIONNOTFOUND.NETASP.NET MVC
Hello Dear Reader! Want to get the best C#, ASP.NET, web tech, tips, and stories anywhere on the Web? Sign up to receive my premium newsletter The Catch Block! Each Wednesday, you'll get the best reads, job listings, stories, tips, and news from around the ASP.NET and C#worlds.
THE REPOSITORY-SERVICE PATTERN WITH DI AND ASP.NET CORESEE MORE ON EXCEPTIONNOTFOUND.NET UNIT TESTING ASP.NET CORE MVC CONTROLLERS WITH MOQ AND XUNIT Currently sponsored by: Syncfusion's 70+ native Blazor controls give apps a superior UI with a fast DataGrid, Charts, Scheduler, and more. Start a free trial now. USING A DAPPER BASE REPOSITORY IN C# TO IMPROVE READABILITY Summary. Large-scale, complex projects benefit the most from readability improvments, and when using Dapper and C# the Dapper Base Repository pattern allows for better code readability and a single point of failure by creating a base class with generic methods that allow for querying and execution against a SQL database. QUICKSORT IN C#STABLE? Â NOBEST-CASE: Â O(N LOG N)SEE MORE ON EXCEPTIONNOTFOUND.NET USING MIDDLEWARE IN .NET 5.0 TO LOG REQUESTS AND RESPONSES The presentation of .NET 5.0 to the wider world has given me the opportunity to dive deeper into some of its features while building an app that will be used in the real world, a rare opportunity I'm loathe to waste. So, my team and I built a new USING ANTI-FORGERY TOKENS IN ASP.NET CORE RAZOR PAGESSEE MORE ON EXCEPTIONNOTFOUND.NETDAPPER VS. EF CORE
SOLITAIRE IN BLAZOR PART 1 Yep, you read that right! We're going to code up a new game in Blazor WebAssembly, and I'm proud to announce that it is quite possibly the single biggest time-waster in all computer history: solitaire! I could really, really use a black nine right about nowTHE CATCH BLOCK #60
The hell weeks continue. But at least we learned something. 2.5 things, in fact. Also in this issue: Pwned Passwords, TypeScript 4.3, technical debt, ConnectFour, hotC# IN SIMPLE TERMS
Since we now know a bit about C# classes, we can learn how to write code that handles unexpected situations and errors.This process is called exception handling, and is a part of all but the most basic C# programs.. Let's learn about exceptions and how C# allows us to handle them! Better watch out, it's catching. Photo by Luis Quintero / Unsplash The Sample Solution THE REPOSITORY-SERVICE PATTERN WITH DI AND ASP.NET CORE The Repository-Service pattern breaks up the business layer of the app into two distinct layers. The lower layer is the Repositories. These classes handle getting data into and out of our data store, with the important caveat that each Repository only works against a single Model class. So, if your models are Dogs, Cats, and Rats, you would MAPPING DATATABLES AND DATAROWS TO OBJECTS IN C# AND .NET One Jump Ahead. So here's a basic problem with converting from DataSet, DataTable, and DataRow objects to C# classes: we don't know at compile time what columns and tables exist in the set, so mapping solutions like AutoMapper won't work for this scenario. Our mapping system will have to assume what columns exist. But, in order to make it more reusable, we will make the mapping system USING MIDDLEWARE IN .NET 5.0 TO LOG REQUESTS AND RESPONSES The presentation of .NET 5.0 to the wider world has given me the opportunity to dive deeper into some of its features while building an app that will be used in the real world, a rare opportunity I'm loathe to waste. So, my team and I built a new ADDING SWAGGER TO ASP.NET CORE WEB API USING XML DOCUMENTATION The Package. First, we need to grab the NuGet package for the project known as Swashbuckle.AspNetCore. This package adds Swagger, SwaggerUI, and other libraries to make it easy for us to create our API documentation. With the package installed, we now need to enable our project to generate XML comments. The comments come from triple-slash IMPLEMENTING POST-REDIRECT-GET IN ASP.NET CORE RAZOR PAGES I've written before about implementing a pattern known as POST-REDIRECT-GET in my ASP.NET MVC apps, and since my team and I are working on a new ASP.NET Core Razor Pages project I thought it might be useful to see if such a pattern can be implemented there.. Don't stare; you might see things you wish you hadn't. Like F#. Photo by Paweł Czerwiński / Unsplash LOADING ENTITY FRAMEWORK RELATED ENTITIES WITH AUTOMAPPER In a previous post I mentioned how we would be using AutoMapper to create Data-Transfer Objects out of Entity Framework entities; the DTOs would then be transmitted over a WCF service. Well, as often happens, a new requirement surfaced recently, and the solution we came up with turned out to be pretty useful, so now I'm sharing it with youall. The Problem
ASPNETCORE_ENVIRONMENT As part of a new ASP.NET Core project that I've been blogging about recently, my team and I have reached the phase where we need to get the project onto some of our development servers, not just running on our local machines.. Problem is, I've been having a hell of a time getting our Azure DevOps system to correctly deploy this site. EXCEPTION NOT FOUNDABOUTAUTHORSGUEST WRITERSMEMBERSHIP Currently sponsored by: Syncfusion's 70+ native Blazor controls give apps a superior UI with a fast DataGrid, Charts, Scheduler, and more. Start a free trial now. DRAWING WITH FABRICJS AND TYPESCRIPT PART 1: INTRO, GOALSSEE MORE ON EXCEPTIONNOTFOUND.NETCUSTOM TYPES IN TYPESCRIPTREACT CANVAS TYPESCRIPTTYPESCRIPT TYPE DEFINITIONTYPESCRIPT TYPE OBJECTNODE JS TYPESCRIPTTYPESCRIPT FOR JAVASCRIPT DEVELOPERS THE REPOSITORY-SERVICE PATTERN WITH DI AND ASP.NET CORESEE MORE ON EXCEPTIONNOTFOUND.NET UNIT TESTING ASP.NET CORE MVC CONTROLLERS WITH MOQ AND XUNIT Currently sponsored by: Syncfusion's 70+ native Blazor controls give apps a superior UI with a fast DataGrid, Charts, Scheduler, and more. Start a free trial now. A 10-STEP GUIDE TO MAKING YOUR BEST TECHNICAL TALK YETTECHNICAL TALK CROSSWORDHOKIES TECH TALK LIVETECH TALKTECH TALK AMERICA Here's the 10-step process I use to make my technical talks the best they can possibly be. 1. Settle on an Idea. This is usually the step that takes the longest. There are a LOT of technical and programming conferences today, and a lot of attendees for them. On the one hand, that's wonderful, because most people can find one near them toattend.
SERIALIZING ENUMS IN ASP.NET WEB APISEE MORE ON EXCEPTIONNOTFOUND.NET USING MIDDLEWARE IN .NET 5.0 TO LOG REQUESTS AND RESPONSES The presentation of .NET 5.0 to the wider world has given me the opportunity to dive deeper into some of its features while building an app that will be used in the real world, a rare opportunity I'm loathe to waste. So, my team and I built a new HOW TO USE ATTRIBUTE ROUTING IN ASP.NET CORE 3.0 MVCSEE MORE ON EXCEPTIONNOTFOUND.NET IMPLEMENTING POST-REDIRECT-GET IN ASP.NET CORE RAZOR PAGES We can remove the annoying "Confirm Form Resubmission" popups and make our user experience just that much better by using the POST-REDIRECT-GET (PRG) pattern in ASP.NET Core and Razor Pages. Remember the following in order to implement PRG: Make the parameters to the search inputs to the OnGet () function. FIXING INTELLISENSE AND GO TO DEFINITION IN VISUAL STUDIO 2019 I had a set of very strange problems after upgrading to Visual Studio 2019 early this week, and they were significantly hampering my ability to get work done. Go To Definition didn't work for a great many classes, methods, and properties.Intellisense was straight-up missing in multiple places.I hadn't EXCEPTION NOT FOUNDABOUTAUTHORSGUEST WRITERSMEMBERSHIP Currently sponsored by: Syncfusion's 70+ native Blazor controls give apps a superior UI with a fast DataGrid, Charts, Scheduler, and more. Start a free trial now. DRAWING WITH FABRICJS AND TYPESCRIPT PART 1: INTRO, GOALSSEE MORE ON EXCEPTIONNOTFOUND.NETCUSTOM TYPES IN TYPESCRIPTREACT CANVAS TYPESCRIPTTYPESCRIPT TYPE DEFINITIONTYPESCRIPT TYPE OBJECTNODE JS TYPESCRIPTTYPESCRIPT FOR JAVASCRIPT DEVELOPERS THE REPOSITORY-SERVICE PATTERN WITH DI AND ASP.NET CORESEE MORE ON EXCEPTIONNOTFOUND.NET UNIT TESTING ASP.NET CORE MVC CONTROLLERS WITH MOQ AND XUNIT Currently sponsored by: Syncfusion's 70+ native Blazor controls give apps a superior UI with a fast DataGrid, Charts, Scheduler, and more. Start a free trial now. A 10-STEP GUIDE TO MAKING YOUR BEST TECHNICAL TALK YETTECHNICAL TALK CROSSWORDHOKIES TECH TALK LIVETECH TALKTECH TALK AMERICA Here's the 10-step process I use to make my technical talks the best they can possibly be. 1. Settle on an Idea. This is usually the step that takes the longest. There are a LOT of technical and programming conferences today, and a lot of attendees for them. On the one hand, that's wonderful, because most people can find one near them toattend.
SERIALIZING ENUMS IN ASP.NET WEB APISEE MORE ON EXCEPTIONNOTFOUND.NET USING MIDDLEWARE IN .NET 5.0 TO LOG REQUESTS AND RESPONSES The presentation of .NET 5.0 to the wider world has given me the opportunity to dive deeper into some of its features while building an app that will be used in the real world, a rare opportunity I'm loathe to waste. So, my team and I built a new HOW TO USE ATTRIBUTE ROUTING IN ASP.NET CORE 3.0 MVCSEE MORE ON EXCEPTIONNOTFOUND.NET IMPLEMENTING POST-REDIRECT-GET IN ASP.NET CORE RAZOR PAGES We can remove the annoying "Confirm Form Resubmission" popups and make our user experience just that much better by using the POST-REDIRECT-GET (PRG) pattern in ASP.NET Core and Razor Pages. Remember the following in order to implement PRG: Make the parameters to the search inputs to the OnGet () function. FIXING INTELLISENSE AND GO TO DEFINITION IN VISUAL STUDIO 2019 I had a set of very strange problems after upgrading to Visual Studio 2019 early this week, and they were significantly hampering my ability to get work done. Go To Definition didn't work for a great many classes, methods, and properties.Intellisense was straight-up missing in multiple places.I hadn't SOLITAIRE IN BLAZOR PART 1 Yep, you read that right! We're going to code up a new game in Blazor WebAssembly, and I'm proud to announce that it is quite possibly the single biggest time-waster in all computer history: solitaire! I could really, really use a black nine right about nowTHE CATCH BLOCK #60
The hell weeks continue. But at least we learned something. 2.5 things, in fact. Also in this issue: Pwned Passwords, TypeScript 4.3, technical debt, ConnectFour, hot A 10-STEP GUIDE TO MAKING YOUR BEST TECHNICAL TALK YET Here's the 10-step process I use to make my technical talks the best they can possibly be. 1. Settle on an Idea. This is usually the step that takes the longest. There are a LOT of technical and programming conferences today, and a lot of attendees for them. On the one hand, that's wonderful, because most people can find one near them toattend.
THE ASP.NET WEB API 2 HTTP MESSAGE LIFECYCLE IN 43 EASY STEPS The ASP.NET Web API 2 HTTP Message Lifecycle in 43 Easy Steps. Anyone who works with ASP.NET Web API should check out this poster that Microsoft created to explain the Request/Response Pipeline that Web API utilizes. It's amazing, and if you do any work in Web API you should check it out! Right now. Yes, seriously. MODELSTATE IN ASP.NET 5.0 MVC ModelState is a property of a Controller instance, and can be accessed from any class that inherits from Microsoft.AspNetCore.Mvc.Controller. The ModelState has two purposes: to store and submit POSTed name-value pairs, and to store the validation errors associated with each value. All right, enough of the boring explanation. ASP.NET CORE GUIDE FOR ASP.NET FRAMEWORK DEVELOPERS If you are a C# developer, chances are you have heard about this new .NET Core thing and the new version of the ASP.NET framework. You can continue to work with ASP.NET Web API or any other framework from the old ASP.NET you've known for years. USING A DAPPER BASE REPOSITORY IN C# TO IMPROVE READABILITY Summary. Large-scale, complex projects benefit the most from readability improvments, and when using Dapper and C# the Dapper Base Repository pattern allows for better code readability and a single point of failure by creating a base class with generic methods that allow for querying and execution against a SQL database. USING MIDDLEWARE IN .NET 5.0 TO LOG REQUESTS AND RESPONSES The presentation of .NET 5.0 to the wider world has given me the opportunity to dive deeper into some of its features while building an app that will be used in the real world, a rare opportunity I'm loathe to waste. So, my team and I built a newASP.NET MVC
Hello Dear Reader! Want to get the best C#, ASP.NET, web tech, tips, and stories anywhere on the Web? Sign up to receive my premium newsletter The Catch Block! Each Wednesday, you'll get the best reads, job listings, stories, tips, and news from around the ASP.NET and C#worlds.
USING EF CORE'S INMEMORY PROVIDER TO STORE A "DATABASE" IN Entity Framework Core's InMemory provider allows us to create a "database" in memory that our applications can use just like a normal datastore. In our sample, we use it as the backing store to an MVC application, but in the real-world we'd more likely use it in test cases. Don't forget to check out the sample project on GitHub if you'dlike to
EXCEPTION NOT FOUND
STORIES FROM A WEB DEVELOPER -------------------------A
visual tool to manage any project or team! meet monday.comads
via Carbon
-------------------------* CATEGORIES
* ABOUT ME
* SESSIONIZE
* SPEAKING ENGAGEMENTS__ __
__
__
__
Buy me a coffee
© Matthew Jones
2019 Ghost &
StayPuft
__ insertion-sorts
INSERTION SORT - THE SORTING ALGORITHM FAMILY REUNION The eldest child of the family, Insertion Sort has a good life. Between working as an accountant at a high-powered law firm and her indelible engagement and eventual marriage to loving husband Quick __ 6 hours ago July 25th, 2019 3 min read __ divide-and-conquer-sorts MERGE SORT - THE SORTING ALGORITHM FAMILY REUNION Merge Sort is the matriarch of the sorting algorithm family. Â A source of wisdom for all her children (and a not-insignificant amount of "I told you so"), she is constantly looking out for __ 4 days ago July 21st, 2019 4 min read__ selection-sorts
SELECTION SORT - THE SORTING ALGORITHM FAMILY REUNION Selection Sort is old, and he likes things done a certain way. It may not be efficient, but we still love him. __ 8 days ago July 17th, 2019 3 min read__ mega-series
INTRODUCING THE SORTING ALGORITHM FAMILY REUNION Welcome, dear readers, to a brand new mega-series! This one is quite possibly the nerdiest thing I have ever blogged about. Â It's also the reason there hasn't been as many posts as normal __ 10 days ago July 15th, 2019 2 min read__ screwups
TEN SECONDS, IDENTITY, AND 20% MEMORY LOSS: WHY YOU NEED BACKUPS How much is 20% of your memories worth? __ 2 months ago June 10th, 2019 6 min read__ __
__
__
__
Buy me a coffee
© Matthew Jones
2019 Ghost &
StayPuft
Details
Copyright © 2024 ArchiveBay.com. All rights reserved. Terms of Use | Privacy Policy | DMCA | 2021 | Feedback | Advertising | RSS 2.0