Evil  David

Evil David

1596597601

Build High-performance Microservices with gRPC and .NET

gRPC is a high-performance RPC framework designed for microservices. In this talk you will learn how to use gRPC in .NET and see how gRPC’s support for deadlines and cancellation can be used to create fast, reliable microservice apps.

#microservices #.net #grpc

What is GEEK

Buddha Community

Build High-performance Microservices with gRPC and .NET
Einar  Hintz

Einar Hintz

1602560783

jQuery Ajax CRUD in ASP.NET Core MVC with Modal Popup

In this article, we’ll discuss how to use jQuery Ajax for ASP.NET Core MVC CRUD Operations using Bootstrap Modal. With jQuery Ajax, we can make HTTP request to controller action methods without reloading the entire page, like a single page application.

To demonstrate CRUD operations – insert, update, delete and retrieve, the project will be dealing with details of a normal bank transaction. GitHub repository for this demo project : https://bit.ly/33KTJAu.

Sub-topics discussed :

  • Form design for insert and update operation.
  • Display forms in modal popup dialog.
  • Form post using jQuery Ajax.
  • Implement MVC CRUD operations with jQuery Ajax.
  • Loading spinner in .NET Core MVC.
  • Prevent direct access to MVC action method.

Create ASP.NET Core MVC Project

In Visual Studio 2019, Go to File > New > Project (Ctrl + Shift + N).

From new project window, Select Asp.Net Core Web Application_._

Image showing how to create ASP.NET Core Web API project in Visual Studio.

Once you provide the project name and location. Select Web Application(Model-View-Controller) and uncheck HTTPS Configuration. Above steps will create a brand new ASP.NET Core MVC project.

Showing project template selection for .NET Core MVC.

Setup a Database

Let’s create a database for this application using Entity Framework Core. For that we’ve to install corresponding NuGet Packages. Right click on project from solution explorer, select Manage NuGet Packages_,_ From browse tab, install following 3 packages.

Showing list of NuGet Packages for Entity Framework Core

Now let’s define DB model class file – /Models/TransactionModel.cs.

public class TransactionModel
{
    [Key]
    public int TransactionId { get; set; }

    [Column(TypeName ="nvarchar(12)")]
    [DisplayName("Account Number")]
    [Required(ErrorMessage ="This Field is required.")]
    [MaxLength(12,ErrorMessage ="Maximum 12 characters only")]
    public string AccountNumber { get; set; }

    [Column(TypeName ="nvarchar(100)")]
    [DisplayName("Beneficiary Name")]
    [Required(ErrorMessage = "This Field is required.")]
    public string BeneficiaryName { get; set; }

    [Column(TypeName ="nvarchar(100)")]
    [DisplayName("Bank Name")]
    [Required(ErrorMessage = "This Field is required.")]
    public string BankName { get; set; }

    [Column(TypeName ="nvarchar(11)")]
    [DisplayName("SWIFT Code")]
    [Required(ErrorMessage = "This Field is required.")]
    [MaxLength(11)]
    public string SWIFTCode { get; set; }

    [DisplayName("Amount")]
    [Required(ErrorMessage = "This Field is required.")]
    public int Amount { get; set; }

    [DisplayFormat(DataFormatString = "{0:MM/dd/yyyy}")]
    public DateTime Date { get; set; }
}

C#Copy

Here we’ve defined model properties for the transaction with proper validation. Now let’s define  DbContextclass for EF Core.

#asp.net core article #asp.net core #add loading spinner in asp.net core #asp.net core crud without reloading #asp.net core jquery ajax form #asp.net core modal dialog #asp.net core mvc crud using jquery ajax #asp.net core mvc with jquery and ajax #asp.net core popup window #bootstrap modal popup in asp.net core mvc. bootstrap modal popup in asp.net core #delete and viewall in asp.net core #jquery ajax - insert #jquery ajax form post #modal popup dialog in asp.net core #no direct access action method #update #validation in modal popup

Evil  David

Evil David

1596597601

Build High-performance Microservices with gRPC and .NET

gRPC is a high-performance RPC framework designed for microservices. In this talk you will learn how to use gRPC in .NET and see how gRPC’s support for deadlines and cancellation can be used to create fast, reliable microservice apps.

#microservices #.net #grpc

Aileen  Jacobs

Aileen Jacobs

1599205920

ARM64 Performance in .NET 5

The .NET team has significantly improved performance with .NET 5, both generally and for ARM64. You can check out the general improvements in the excellent and detailed Performance Improvements in .NET 5 blog by Stephen. In this post, I will describe the performance improvements we made specifically for ARM64 and show the positive impact on the benchmarks we use. I will also share some of the additional opportunities for performance improvements that we have identified and plan to address in a future release.

While we have been working on ARM64 support in RyuJIT for over five years, most of the work that was done was to ensure that we generate functionally correct ARM64 code. We spent very little time in evaluating the performance of the code RyuJIT produced for ARM64. As part of .NET 5, our focus was to perform investigation in this area and find out any obvious issues in RyuJIT that would improve the ARM64 code quality (CQ). Since Microsoft VC++ team already has support for Windows ARM64, we consulted with them to understand the CQ issues that they encountered when doing a similar exercise.

#.net core #.net internals #c# #dot.net #performance #.net #arm #arm64 #performance #ryujit

gRPC & ASP.NET Core 3.1: How to create a gRPC service ?

You’ll need to open Visual Studio 2019 and select “gRPC service” in “Create a new project” screen:

gRPC & ASP.NET Core 3.1: How to create a gRPC service ? – Anthony Giretti’s .NET blog

#asp.net core #.net core 3 #asp.net core 3 #envoy #grpc #.net

gRPC & ASP.NET Core 3.1: Message validation

Introduction
Validation is a very important feature in applications but in ASP.NET Core 3.1 and gRPC it’s a bit complicated…. Proto3 doesn’t provide any validation with its syntax and Microsoft gaves us the habit to use DataAnnotation in ASP.NET and ASP.NET Core, unfortunaltey this feature is not available neither in gRPC. So a solution is required to fix that limitation, in this article I will show you how to use packages I have designed : Calzolari.Grpc.AspNetCore.Validation and Calzolari.Grpc.Net.Client.Validation. The full documentation is available here: https://github.com/AnthonyGiretti/grpc-aspnetcore-validator (forked and improved with more features from https://github.com/enif-lee/grpc-dotnet-validator).

#asp.net core #asp.net core 3 #grpc #grpc client #.net #blog